Interface ITextToSpeechService
Definition
- Assembly:
- Tizen.AIAvatar.dll
Interface for a Text-to-Speech service.
public interface ITextToSpeechService
Methods
View SourceTextToSpeechAsync(string, string, Dictionary<string, object>)
Converts the given text to speech asynchronously and returns the audio data.
Declaration
Task<byte[]> TextToSpeechAsync(string text, string voice = null, Dictionary<string, object> options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text to be converted to speech. |
| string | voice | Optional parameter to specify the voice type. |
| Dictionary<, ><string, object> | options | Optional parameters for customizing speech output. |
Returns
| Type | Description |
|---|---|
| Task<><byte[]> | A task representing the asynchronous operation, with a byte array of the generated audio data. |
TextToSpeechStreamAsync(string, string, Dictionary<string, object>)
Streams the given text as speech asynchronously.
Declaration
Task TextToSpeechStreamAsync(string text, string voice = null, Dictionary<string, object> options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text to be converted to speech. |
| string | voice | Optional parameter to specify the voice type. |
| Dictionary<, ><string, object> | options | Optional parameters for customizing speech output. |
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |
Events
View SourceOnTtsFinish
Occurs when the Text-to-Speech service finishes processing.
Declaration
event EventHandler<ttsStreamingEventArgs> OnTtsFinish
Event Type
| Type | Description |
|---|---|
| EventHandler<><ttsStreamingEventArgs> |
OnTtsReceiving
Occurs when the Text-to-Speech service is receiving data.
Declaration
event EventHandler<ttsStreamingEventArgs> OnTtsReceiving
Event Type
| Type | Description |
|---|---|
| EventHandler<><ttsStreamingEventArgs> |
OnTtsStart
Occurs when the Text-to-Speech service starts processing.
Declaration
event EventHandler<ttsStreamingEventArgs> OnTtsStart
Event Type
| Type | Description |
|---|---|
| EventHandler<><ttsStreamingEventArgs> |