Interface ITextToSpeechPlayer
Interface for playing synthesized speech audio from text-to-speech output.
Namespace: Glitch9.AIDevKit.Agents
Assembly: Glitch9.AIDevKit.dll
Syntax
public interface ITextToSpeechPlayer
Properties
| Edit this page View SourceChannels
Gets the number of audio channels (1 for mono, 2 for stereo).
Declaration
int Channels { get; }
Property Value
| Type | Description |
|---|---|
| int |
SampleRate
Gets the sample rate of the audio player in Hz.
Declaration
int SampleRate { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourcePlayCompletedAudio(AudioClip, float)
Plays a completed audio clip at the specified volume.
Declaration
void PlayCompletedAudio(AudioClip audioClip, float volume = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| AudioClip | audioClip | |
| float | volume |
PlayDelta(Delta<IAudioChunk>, float)
Plays a streaming audio delta chunk received from the TTS service.
Declaration
void PlayDelta(Delta<IAudioChunk> delta, float volume = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| Delta<IAudioChunk> | delta | |
| float | volume |