BogaNet 1.4.0
Loading...
Searching...
No Matches
Public Member Functions | Properties | Events | List of all members
BogaNet.TTS.Provider.BrowserVoiceProvider Class Reference

Provider for TTS in Avalonia (browser). More...

Inheritance diagram for BogaNet.TTS.Provider.BrowserVoiceProvider:
BogaNet.TTS.Provider.IVoiceProvider

Public Member Functions

 BrowserVoiceProvider ()
 
virtual List< VoiceGetVoices ()
 Get all available voices from the current TTS-provider as a list.
 
virtual Task< List< Voice > > GetVoicesAsync ()
 Get all available voices from the current TTS-provider as a list asynchronously.
 
virtual void Silence ()
 Silence all active TTS speeches.
 
virtual bool Speak (string text, Voice? voice=null, float rate=1, float pitch=1, float volume=1, bool forceSSML=true, bool useThreads=false)
 The current provider speaks a text with a given voice.
 
virtual Task< bool > SpeakAsync (string text, Voice? voice=null, float rate=1, float pitch=1, float volume=1, bool forceSSML=true)
 The current provider speaks a text with a given voice asynchronously.
 
- Public Member Functions inherited from BogaNet.TTS.Provider.IVoiceProvider
delegate void VoicesLoaded (List< Voice > voices)
 Delegate for the load status of the voices.
 
delegate void SpeakStarted (string text)
 Delegate for the speak status.
 
delegate void SpeakCompleted (string text)
 Delegate for the speak status.
 

Properties

virtual List< VoiceVoices [get]
 Get all available voices from the current TTS-provider and fills it into a given list.
 
virtual int MaxTextLength [get]
 Maximal length of the speech text (in characters).
 
virtual bool IsPlatformSupported [get]
 Indicates if this provider is supporting the current platform.
 
virtual bool IsSSMLSupported [get]
 Indicates if this provider is supporting SSML.
 
virtual List< string > Cultures [get]
 Get all available cultures from the current provider (ISO 639-1).
 
virtual bool IsReady [get]
 Is the provider ready to use?
 
virtual bool IsSpeaking [get]
 Is the provider currently speaking?
 
- Properties inherited from BogaNet.TTS.Provider.IVoiceProvider

Events

IVoiceProvider.? VoicesLoaded OnVoicesLoaded
 
IVoiceProvider.? SpeakStarted OnSpeakStarted
 
IVoiceProvider.? SpeakCompleted OnSpeakCompleted
 
- Events inherited from BogaNet.TTS.Provider.IVoiceProvider
VoicesLoaded OnVoicesLoaded
 Event triggered whenever the voices are loaded.
 
SpeakStarted OnSpeakStarted
 Event triggered whenever a speech is started.
 
SpeakCompleted OnSpeakCompleted
 Event triggered whenever a speech is completed.
 

Detailed Description

Provider for TTS in Avalonia (browser).

Constructor & Destructor Documentation

◆ BrowserVoiceProvider()

BogaNet.TTS.Provider.BrowserVoiceProvider.BrowserVoiceProvider ( )

Member Function Documentation

◆ GetVoices()

virtual List< Voice > BogaNet.TTS.Provider.BrowserVoiceProvider.GetVoices ( )
virtual

Get all available voices from the current TTS-provider as a list.

Returns
All available voices (alphabetically ordered by 'Name') as a list.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ GetVoicesAsync()

virtual Task< List< Voice > > BogaNet.TTS.Provider.BrowserVoiceProvider.GetVoicesAsync ( )
virtual

Get all available voices from the current TTS-provider as a list asynchronously.

Returns
All available voices (alphabetically ordered by 'Name') as a list.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ Silence()

virtual void BogaNet.TTS.Provider.BrowserVoiceProvider.Silence ( )
virtual

Silence all active TTS speeches.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ Speak()

virtual bool BogaNet.TTS.Provider.BrowserVoiceProvider.Speak ( string text,
Voice? voice = null,
float rate = 1,
float pitch = 1,
float volume = 1,
bool forceSSML = true,
bool useThreads = false )
virtual

The current provider speaks a text with a given voice.

Parameters
textText to speak.
voiceVoice to speak (optional).
rateSpeech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional).
pitchPitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional).
volumeVolume of the speaker in percent (1 = 100%, values: 0.01-1, default: 1, optional).
forceSSMLForce SSML on supported platforms (default: true, optional).
useThreadsAllows to run every Speak-call on a separate thread (default: false, optional).
Returns
True if the speech was successful

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ SpeakAsync()

virtual Task< bool > BogaNet.TTS.Provider.BrowserVoiceProvider.SpeakAsync ( string text,
Voice? voice = null,
float rate = 1,
float pitch = 1,
float volume = 1,
bool forceSSML = true )
virtual

The current provider speaks a text with a given voice asynchronously.

Parameters
textText to speak.
voiceVoice to speak (optional).
rateSpeech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional).
pitchPitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional).
volumeVolume of the speaker in percent (1 = 100%, values: 0.01-1, default: 1, optional).
forceSSMLForce SSML on supported platforms (default: true, optional).
Returns
True if the speech was successful

Implements BogaNet.TTS.Provider.IVoiceProvider.

Property Documentation

◆ Cultures

virtual List<string> BogaNet.TTS.Provider.BrowserVoiceProvider.Cultures
get

Get all available cultures from the current provider (ISO 639-1).

Returns
All available cultures (alphabetically ordered by 'Culture') as a list.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ IsPlatformSupported

virtual bool BogaNet.TTS.Provider.BrowserVoiceProvider.IsPlatformSupported
get

Indicates if this provider is supporting the current platform.

Returns
True if this provider supports current platform.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ IsReady

virtual bool BogaNet.TTS.Provider.BrowserVoiceProvider.IsReady
get

Is the provider ready to use?

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ IsSpeaking

virtual bool BogaNet.TTS.Provider.BrowserVoiceProvider.IsSpeaking
get

Is the provider currently speaking?

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ IsSSMLSupported

virtual bool BogaNet.TTS.Provider.BrowserVoiceProvider.IsSSMLSupported
get

Indicates if this provider is supporting SSML.

Returns
True if this provider supports SSML.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ MaxTextLength

virtual int BogaNet.TTS.Provider.BrowserVoiceProvider.MaxTextLength
get

Maximal length of the speech text (in characters).

Returns
The maximal length of the speech text.

Implements BogaNet.TTS.Provider.IVoiceProvider.

◆ Voices

virtual List<Voice> BogaNet.TTS.Provider.BrowserVoiceProvider.Voices
get

Get all available voices from the current TTS-provider and fills it into a given list.

Returns
All available voices (alphabetically ordered by 'Name') as a list.

Implements BogaNet.TTS.Provider.IVoiceProvider.

Event Documentation

◆ OnSpeakCompleted

IVoiceProvider.? SpeakCompleted BogaNet.TTS.Provider.BrowserVoiceProvider.OnSpeakCompleted

◆ OnSpeakStarted

IVoiceProvider.? SpeakStarted BogaNet.TTS.Provider.BrowserVoiceProvider.OnSpeakStarted

◆ OnVoicesLoaded

IVoiceProvider.? VoicesLoaded BogaNet.TTS.Provider.BrowserVoiceProvider.OnVoicesLoaded

The documentation for this class was generated from the following file: