Jump to content

Component: Speech (Phoneme) (Audio Output): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(11 intermediate revisions by 3 users not shown)
Line 14: Line 14:
==Speech (Phoneme) component==
==Speech (Phoneme) component==
Speech component allowing Phoneme based speech for use on an embedded platform. The simulation also has an advanced speech engine allowing realistic text to speech in multiple languages using the RealSpeak voice engine.
Speech component allowing Phoneme based speech for use on an embedded platform. The simulation also has an advanced speech engine allowing realistic text to speech in multiple languages using the RealSpeak voice engine.
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_speech.fcfx FC_Comp_Source_speech.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_speech.fcfx FC_Comp_Source_speech.fcfx]


==Detailed description==
==Detailed description==
Line 85: Line 79:


Another example of Phoneme Speech, taking a reading from an analogue channel and speaking the Voltage. (download and simulation)
Another example of Phoneme Speech, taking a reading from an analogue channel and speaking the Voltage. (download and simulation)
{{Fcfile|Voice Meter_v6.fcfx|Talking Volt Meter}}
{{Fcfile|Voice Meter.fcfx|Talking Volt Meter}}
Example of Real Speak Speech (simulation only)
{{Fcfile|Speech2.fcfx|Speech2}}
Adding additional language packs to the Real Speak engine.
 
[http://www.freedomscientific.com/downloads/RealSpeak-Solo-Direct-Voices/RealSpeak-Solo-Direct-Downloads.asp Real Speak Voice Downloads]
 
 
 
 


==Macro reference==
==Macro reference==


===ReadPhonemeLength===
===DisableOutput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ReadPhonemeLength'''
| width="90%" class="mtx-class-macrohead" | '''DisableOutput'''
|-
|-
| colspan="2" | Function to return the number of bytes used in a single phoneme array. 
| colspan="2" | Disables the output to prevent any buzzing etc while not speaking. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Phoneme
|-
| colspan="2" | Specifies a single Phoneme 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 118: Line 98:


===EnableOutput===
===EnableOutput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''EnableOutput'''
| width="90%" class="mtx-class-macrohead" | '''EnableOutput'''
|-
|-
| colspan="2" | Sets up the output to allow the speech data to be streamed out. 
| colspan="2" | Sets up the output to allow the speech data to be streamed out. 
Line 131: Line 111:




===DisableOutput===
===Ev_Start===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''Ev_Start'''
|-
| colspan="2" | Broadcast to all components that simulation is starting 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===OutputPhoneme===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''OutputPhoneme'''
|-
| colspan="2" | Streams a single Phoneme or string of comma seperated Phonemes. OutputPhoneme("OY") OutputPhoneme("OY,AY,OY") 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisableOutput'''
|-
|-
| colspan="2" | Disables the output to prevent any buzzing etc while not speaking. 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | DataString
|-
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 146: Line 145:


===ReadByteFromPhoneme===
===ReadByteFromPhoneme===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ReadByteFromPhoneme'''
| width="90%" class="mtx-class-macrohead" | '''ReadByteFromPhoneme'''
|-
|-
| colspan="2" | Reads a single byte value from the specified phoneme data array. This function will not simulate correctly as it requires C style pointers. 
| colspan="2" | Reads a single byte value from the specified phoneme data array. This function will not simulate correctly as it requires C style pointers. 
Line 169: Line 168:




===OutputPhoneme===
===ReadPhonemeLength===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''OutputPhoneme'''
| width="90%" class="mtx-class-macrohead" | '''ReadPhonemeLength'''
|-
|-
| colspan="2" | Streams a single Phoneme or string of comma seperated Phonemes. OutputPhoneme("OY") OutputPhoneme("OY,AY,OY") 
| colspan="2" | Function to return the number of bytes used in a single phoneme array. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | DataString
| width="90%" | Phoneme
|-
|-
| colspan="2" |  
| colspan="2" | Specifies a single Phoneme 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Phoneme Settings
| width="90%" class="mtx-class-propfolder" | Phoneme Settings
|-
|-
|-
|-
Line 252: Line 249:
| colspan="2" | The actual port pin assigned to the selected PWM channel. 
| colspan="2" | The actual port pin assigned to the selected PWM channel. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Phoneme Selection
| width="90%" class="mtx-class-propfolder" | Phoneme Selection
|-
|-
|-
|-
Line 586: Line 583:
| colspan="2" | Phoneme selection 
| colspan="2" | Phoneme selection 
|}
|}
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_speech.fcfx FC_Comp_Source_speech.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_speech.fcfx FC_Comp_Source_speech.fcfx]

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd
Version 1.2
Category Audio Output


Speech (Phoneme) component

Speech component allowing Phoneme based speech for use on an embedded platform. The simulation also has an advanced speech engine allowing realistic text to speech in multiple languages using the RealSpeak voice engine.

Detailed description

No detailed description exists yet for this component

Examples

Example of Phoneme Speech (download and simulation) Speech The Phoneme based speech can be output on Microcontroller hardware using a number of methods.


PWM - Outputs using a single PWM pin, a simple external RC low pass filter can be used to remove the high frequency PWM to create an audio signal.

Parallel - Outputs using a 8-bit port, a simple 8-bit R2R DAC circuit can be used to combine the bits into an audio signal.

Other - A third option is to use the ReadByteFromPhoneme macro to pull out the phoneme values a byte at a time which can be used to pass on to an external DAC etc.


Another example of Phoneme Speech, taking a reading from an analogue channel and speaking the Voltage. (download and simulation) Talking Volt Meter

Macro reference

DisableOutput

DisableOutput
Disables the output to prevent any buzzing etc while not speaking. 
- VOID Return


EnableOutput

EnableOutput
Sets up the output to allow the speech data to be streamed out. 
- VOID Return


Ev_Start

Ev_Start
Broadcast to all components that simulation is starting 
- ULONG Return


OutputPhoneme

OutputPhoneme
Streams a single Phoneme or string of comma seperated Phonemes. OutputPhoneme("OY") OutputPhoneme("OY,AY,OY") 
- STRING DataString
 
- VOID Return


ReadByteFromPhoneme

ReadByteFromPhoneme
Reads a single byte value from the specified phoneme data array. This function will not simulate correctly as it requires C style pointers. 
- STRING Phoneme
Specifies a single Phoneme 
- UINT Idx
Specifies the position within the Phoneme 
- BYTE Return


ReadPhonemeLength

ReadPhonemeLength
Function to return the number of bytes used in a single phoneme array. 
- STRING Phoneme
Specifies a single Phoneme 
- UINT Return


Property reference

Properties
Phoneme Settings
Phoneme Selection
Selects which phonemes are included in the embedded firmware 
Phoneme Data Set
Specifies if the phonemes used are based on the inbuilt phoneme wav files set or a custom file set. To create your own phonemes, copy the wav files from the components directory, then overwrite the phonemes you wish to edit. Phonemes are re-parsed on simulation start and on compile to C. 
Pitch (Hz)
The frequency at which the phoneme data is output in bytes/samples per second. 
Phoneme Data Size
The number of bytes used by the current phoneme selection 
ROM Size
The maximum number of bytes available in the ROM of the selected target device. The ROM has to contain the program as well as the Phoneme data. 
Base ROM Address
The address in ROM to place the phoneme data. It is recomended to always use the suggested address as this will place the phonemes right at the end of ROM and away from the program. 
Suggested Address
The ideal address to allow all the selected phonemes to fit into the end of the ROM memory Thereby allowing the maximum space for the user program. 
Output Mode
Determines how the phoneme data is going to be output. 
PWM Pin
PWM channel selection used to determine which PWM peripheral to stream the Phoneme data to. 
PWM Pin
The actual port pin assigned to the selected PWM channel. 
Phoneme Selection
Select All
Selects all Phonemes 
Select None
Deselects all Phonemes 
PA1 (10ms)
10ms Pause - Always included 
PA2 (30ms)
30ms Pause - Always included 
PA3 (50ms)
50ms Pause - Always included 
PA4 (100ms)
100ms Pause - Always included 
PA5 (200ms)
200ms Pause - Always included 
AA - hOt
Phoneme selection 
AE - hAt
Phoneme selection 
AO - AUght
Phoneme selection 
AR - alARm
Phoneme selection 
AW - sOUnd
Phoneme selection 
AX - Apple
Phoneme selection 
AY - skY
Phoneme selection 
BB1 - Brown
Phoneme selection 
BB2 - Business
Phoneme selection 
CH - CHurCH
Phoneme selection 
DD1 - enD
Phoneme selection 
DD2 - Down
Phoneme selection 
DH1 - THey
Phoneme selection 
DH2 - baTHe
Phoneme selection 
EH - Extent
Phoneme selection 
EL - angLE
Phoneme selection 
ER1 - intERupt
Phoneme selection 
ER2 - bIRd
Phoneme selection 
EY - grEAt
Phoneme selection 
FF - Food
Phoneme selection 
GG1 - Get
Phoneme selection 
GG2 - Green
Phoneme selection 
GG3 - anGer
Phoneme selection 
HH1 - Help
Phoneme selection 
HH2 - Hope
Phoneme selection 
IH - sIt
Phoneme selection 
IY - trEAt
Phoneme selection 
JH - inJure
Phoneme selection 
KK1 - Clown
Phoneme selection 
KK2 - tasK
Phoneme selection 
KK3 - Crane
Phoneme selection 
LL - Lake
Phoneme selection 
MM - Milk
Phoneme selection 
NG - aNGer
Phoneme selection 
NN1 - thiN
Phoneme selection 
NN2 - Now
Phoneme selection 
OR - stORe
Phoneme selection 
OW - zOne
Phoneme selection 
OY - nOIse
Phoneme selection 
PP - triP
Phoneme selection 
RR1 - WRite
Phoneme selection 
RR2 - gRease
Phoneme selection 
SH - SHip
Phoneme selection 
SS - teSt
Phoneme selection 
TH - THin
Phoneme selection 
TT1 - tesT
Phoneme selection 
TT2 - Test
Phoneme selection 
UH - bOOk
Phoneme selection 
UW1 - cumpUter
Phoneme selection 
UW2 - fOOd
Phoneme selection 
VV - Vest
Phoneme selection 
WH - WHite
Phoneme selection 
WW - Work
Phoneme selection 
XR - haiR
Phoneme selection 
YR - clEAR
Phoneme selection 
YY1 - compUter
Phoneme selection 
YY2 - Yes
Phoneme selection 
ZH - aZure
Phoneme selection 
ZZ - phaSe
Phoneme selection 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_speech.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_speech.fcfx