Skip to main content

AudioPacket

Module: Inworld.AI. Namespace: Inworld.Packet. Inherited from InworldPacket

This packet is used for audio chunks and phoneme information for lipsync.

VariablesDescription
dataChunkThe DataChunk of the audio.

Properties

PropertiesDescription
ClipGenerates an AudioClip based on its DataChunk.

API

FunctionDescriptionParameters
DumpWaveFileDump received audio packet and phonemeInfo to local files.fileName: the target file name to store.
the audio file would be saved as .wav file and the phonemeInfo would be saved as .json file.

DataChunk

Module: Inworld.AI. Namespace: Inworld.Packet.

VariablesDescription
chunkThe base64 string of the audio wave data.
typeIn Unity SDK, it's always AUDIO.
additionalPhonemeInfoA list of the PhonemeInfo in the datachunk

PhonemeInfo

Module: Inworld.AI. Namespace: Inworld.Packet.

VariablesDescription
phonemeThe actual phoneme
startOffsetThe start offset in the audio clip.
PropertiesDescription
StartOffsetTrimmed by the returned string into float based on its DataChunk.

PhonemeList

Module: Inworld.AI. Namespace: Inworld.Packet.

VariablesDescription
phonemesThe list of the PhonemeInfo that used to dump lipsync files.
startOffsetThe start offset in the audio clip.