WavUtility
Module: Inworld.AI. Namespace: Inworld. This is the Inworld customized version of WavUtility used to convert wave data to/from other format.
API
Functions | Description | Parameters |
---|---|---|
ShortArrayToWavFile | Generate a wav files from the short array. | shortArray: the short array to transfer. outputPath: the path to generate. sampleRate: the sample rate. |
ToAudioClip | Gets the wave file from Unity's Resource folder. | filePath: the file path to load the wave data. |
ToAudioClip | Generate the Audio clip by byte array. | fileBytes: the date to convert. offsetSamples:the offset of the audio. name:the name of the wav file. |
ConvertAudioClipDataToInt16ByteArray | Convert the audio clip float data to int16 array then convert to byte array. Short array is the data format we use in the Inworld server. | input: the audio clip data. size: the size of the wave data. output: the short array. |
ConvertAudioClipDataToInt16ByteArray | Convert the float array to int16 array then convert to byte array. Short array is the data format we use in the Inworld server. | data: the float array of wave data. |
ConvertAudioClipDataToInt32ByteArray | Convert the audio clip float data to int array. Still keep the API but Inworld don't process int array. | input: the audio clip data. size: the size of the wave data. output: the int32 array. |
ConvertAudioClipDataToInt16Array | Convert the audio clip float data to short array. Short array is the data format we use in the Inworld server. | input: the audio clip data. size: the size of the wave data. |
FromAudioClip | Get the byte array of the wave data from AudioClip | audioClip: the input audio clip |
FromAudioClip | Get the byte array of the wave data from AudioClip | audioClip: the input audio clip filepath: the file path of the wave file. saveAsFile: check if the data is saved as file dirname: the directory of the wave file. |
BitDepth | Get the bit depth of the audio clip | audioClip: the target clip to sample. |