Jump to content

Component: Speech ( Data): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(One intermediate revision by the same user not shown)
Line 41: Line 41:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Cancel'''
| width="90%" class="mtx-class-macrohead" | '''Cancel'''
|-
|-
| colspan="2" | Cancels the current speech and removes all speech fro the queue 
| colspan="2" | Cancels the current speech and removes all speech fro the queue 
Line 55: Line 55:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetVoiceCount'''
| width="90%" class="mtx-class-macrohead" | '''GetVoiceCount'''
|-
|-
| colspan="2" | Returns the number of available voices. 
| colspan="2" | Returns the number of available voices. 
Line 69: Line 69:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetVoiceName'''
| width="90%" class="mtx-class-macrohead" | '''GetVoiceName'''
|-
|-
| colspan="2" | Gets the name of the voice from the list of available voices 
| colspan="2" | Gets the name of the voice from the list of available voices 
Line 88: Line 88:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsPaused'''
| width="90%" class="mtx-class-macrohead" | '''IsPaused'''
|-
|-
| colspan="2" | Returns true if speech synthesis is currently paused 
| colspan="2" | Returns true if speech synthesis is currently paused 
Line 102: Line 102:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsPending'''
| width="90%" class="mtx-class-macrohead" | '''IsPending'''
|-
|-
| colspan="2" | Returns true if there is queued text waiting to be spoken 
| colspan="2" | Returns true if there is queued text waiting to be spoken 
Line 116: Line 116:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsSpeaking'''
| width="90%" class="mtx-class-macrohead" | '''IsSpeaking'''
|-
|-
| colspan="2" | Returns true if there is text currently being spoken, even if speech is currently paused 
| colspan="2" | Returns true if there is text currently being spoken, even if speech is currently paused 
Line 130: Line 130:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Pause'''
| width="90%" class="mtx-class-macrohead" | '''Pause'''
|-
|-
| colspan="2" | Puts the speech synthesis into a paused state 
| colspan="2" | Puts the speech synthesis into a paused state 
Line 144: Line 144:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Resume'''
| width="90%" class="mtx-class-macrohead" | '''Resume'''
|-
|-
| colspan="2" | Puts the speech synthesis into a non-paused state 
| colspan="2" | Puts the speech synthesis into a non-paused state 
Line 158: Line 158:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLanguage'''
| width="90%" class="mtx-class-macrohead" | '''SetLanguage'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 177: Line 177:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetProperties'''
| width="90%" class="mtx-class-macrohead" | '''SetProperties'''
|-
|-
| colspan="2" | Sets the rate, pitch and volume of the speech 
| colspan="2" | Sets the rate, pitch and volume of the speech 
Line 206: Line 206:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetVoice'''
| width="90%" class="mtx-class-macrohead" | '''SetVoice'''
|-
|-
| colspan="2" | Sets the voice to use for speech 
| colspan="2" | Sets the voice to use for speech 
Line 225: Line 225:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Speak'''
| width="90%" class="mtx-class-macrohead" | '''Speak'''
|-
|-
| colspan="2" | Sends text to the speech synthesis queue to be spoken. It will be spoken once any other queued speech has been spoken. 
| colspan="2" | Sends text to the speech synthesis queue to be spoken. It will be spoken once any other queued speech has been spoken. 
Line 244: Line 244:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author MatrixTSL
Version 1.0
Category Data


Speech component

Component that utilises the SpeechSynthesis module of the browser to convert text to audio.

Version information

Library Version, Component Version, Date, Author, Info
1, 1.0, 18-06-24, ST, Created


Detailed description

No detailed description exists yet for this component

Examples

Speech Component Test Example

This example lists the available voices and tests the capabilities of the Speech component.

Speech component test.fcsx

The web app created by this example can be viewed here: Speech component test.html

Macro reference

Cancel

Cancel
Cancels the current speech and removes all speech fro the queue 
- VOID Return


GetVoiceCount

GetVoiceCount
Returns the number of available voices. 
- LONG Return


GetVoiceName

GetVoiceName
Gets the name of the voice from the list of available voices 
- LONG Index
The index of the voice (from 0 to the count of available voices) 
- STRING Return


IsPaused

IsPaused
Returns true if speech synthesis is currently paused 
- BOOL Return


IsPending

IsPending
Returns true if there is queued text waiting to be spoken 
- BOOL Return


IsSpeaking

IsSpeaking
Returns true if there is text currently being spoken, even if speech is currently paused 
- BOOL Return


Pause

Pause
Puts the speech synthesis into a paused state 
- VOID Return


Resume

Resume
Puts the speech synthesis into a non-paused state 
- VOID Return


SetLanguage

SetLanguage
 
- STRING Language
 
- VOID Return


SetProperties

SetProperties
Sets the rate, pitch and volume of the speech 
- FLOAT Pitch
Pitch of speech (0.0 to 2.0, or -1 to keep unchanged) 
- FLOAT Rate
Speed of speech (0.1 to 10.0, or -1 to keep unchanged) 
- FLOAT Volume
Volume of speech (0.0 to 1.0, or -1 to keep unchanged) 
- VOID Return


SetVoice

SetVoice
Sets the voice to use for speech 
- LONG Index
The index of the voice to use (0 to voice count, or -1 for default voice) 
- VOID Return


Speak

Speak
Sends text to the speech synthesis queue to be spoken. It will be spoken once any other queued speech has been spoken. 
- STRING sText
 
- VOID Return


Property reference

Properties

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WEBEXP_Speech.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Speech.fcsx