Component: Speech (Outputs: General)

From Flowcode Help
Jump to navigationJump to search


Author Matrix Ltd
Version 1.2 (Release)
Category Outputs: General


Image Speech 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.

Examples

Example of Phoneme Speech (download and simulation) FC6 Icon.png 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) FC6 Icon.png Talking Volt Meter Example of Real Speak Speech (simulation only) FC6 Icon.png Speech2 Adding additional language packs to the Real Speak engine.

Real Speak Voice Downloads

Downloadable macro reference

ReadPhonemeLength

Function to return the number of bytes used in a single phoneme array.

Parameters

<- STRING Phoneme
Specifies a single Phoneme
This parameter may be returned back to the caller


Return value

UINT


EnableOutput

Sets up the output to allow the speech data to be streamed out.

Parameters

This macro has no parameters


Return value

This call does not return a value


DisableOutput

Disables the output to prevent any buzzing etc while not speaking.

Parameters

This macro has no parameters


Return value

This call does not return a value


ReadByteFromPhoneme

Reads a single byte value from the specified phoneme data array.

This function will not simulate correctly as it requires C style pointers.

Parameters

<- STRING Phoneme
Specifies a single Phoneme
This parameter may be returned back to the caller
UINT Idx
Specifies the position within the Phoneme


Return value

BYTE


OutputPhoneme

Streams a single Phoneme or string of comma seperated Phonemes.

OutputPhoneme("OY")

OutputPhoneme("OY,AY,OY")

Parameters

<- STRING DataString
This parameter may be returned back to the caller


Return value

This call does not return a value


Simulation macro reference

Speak

Simulation only call to allow the computer to speak using the RealSpeak voice engine. Languages need to be downloaded and installed then selected using the Voice property.

Parameters

<- STRING DataString
This parameter may be returned back to the caller


Return value

This call does not return a value



Property reference

Voice

This property is of type Fixed list of ints and can be referenced with the variable name rs_voice.

RealSpeak selected voice - Download and install RealSpeak voices for more options.

Rate

This property is of type Signed integer and can be referenced with the variable name voice_rate.

Voice speech rate - Default 1 - Range (0-100)

Phoneme Selection

This property is of type Fixed list of ints and can be referenced with the variable name ph_select_mode.

Selects which phonemes are included in the embedded firmware

Phoneme Data Set

This property is of type Fixed list of ints and can be referenced with the variable name ph_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)

This property is of type Signed integer and can be referenced with the variable name ph_pitch.

The frequency at which the phoneme data is output in bytes/samples per second.

Phoneme Data Size

This property is of type Signed integer and can be referenced with the variable name data_size.

The number of bytes used by the current phoneme selection

ROM Size

This property is of type Signed integer and can be referenced with the variable name 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

This property is of type Signed integer and can be referenced with the variable name data_start_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

This property is of type Signed integer and can be referenced with the variable name calc_start_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

This property is of type Fixed list of ints and can be referenced with the variable name output_mode.

Determines how the phoneme data is going to be output.

PWM Pin

This property is of type Fixed list of ints and can be referenced with the variable name output_pwm.

PWM channel selection used to determine which PWM peripheral to stream the Phoneme data to.

PWM Pin

This property is of type Single digital pin and can be referenced with the variable name PWMPin.

The actual port pin assigned to the selected PWM channel.

Word Dictionary

This property is of type Fixed list of ints and can be referenced with the variable name ph_dict_word.

No additional information


Phonemes

This property is of type Fixed list of text and can be referenced with the variable name ph_dict_phonemes.

No additional information


Word Count

This property is of type Signed integer and can be referenced with the variable name dict_word_cnt.

No additional information


Add

This property is of type True or false and can be referenced with the variable name dict_add.

No additional information


Word

This property is of type Line of text and can be referenced with the variable name dict_add_word.

No additional information


Phonemes

This property is of type Line of text and can be referenced with the variable name dict_add_phonemes.

No additional information


Delete All

This property is of type True or false and can be referenced with the variable name dict_remove.

No additional information


Select All

This property is of type True or false and can be referenced with the variable name refresh_all.

Selects all Phonemes

Select None

This property is of type True or false and can be referenced with the variable name refresh_none.

Deselects all Phonemes

PA1 (10ms)

This property is of type True or false and can be referenced with the variable name ph_pa1_en.

10ms Pause - Always included

PA2 (30ms)

This property is of type True or false and can be referenced with the variable name ph_pa2_en.

30ms Pause - Always included

PA3 (50ms)

This property is of type True or false and can be referenced with the variable name ph_pa3_en.

50ms Pause - Always included

PA4 (100ms)

This property is of type True or false and can be referenced with the variable name ph_pa4_en.

100ms Pause - Always included

PA5 (200ms)

This property is of type True or false and can be referenced with the variable name ph_pa5_en.

200ms Pause - Always included

AA - hOt

This property is of type True or false and can be referenced with the variable name ph_aa_en.

Phoneme selection

AE - hAt

This property is of type True or false and can be referenced with the variable name ph_ae_en.

Phoneme selection

AO - AUght

This property is of type True or false and can be referenced with the variable name ph_ao_en.

Phoneme selection

AR - alARm

This property is of type True or false and can be referenced with the variable name ph_ar_en.

Phoneme selection

AW - sOUnd

This property is of type True or false and can be referenced with the variable name ph_aw_en.

Phoneme selection

AX - Apple

This property is of type True or false and can be referenced with the variable name ph_ax_en.

Phoneme selection

AY - skY

This property is of type True or false and can be referenced with the variable name ph_ay_en.

Phoneme selection

BB1 - Brown

This property is of type True or false and can be referenced with the variable name ph_bb1_en.

Phoneme selection

BB2 - Business

This property is of type True or false and can be referenced with the variable name ph_bb2_en.

Phoneme selection

CH - CHurCH

This property is of type True or false and can be referenced with the variable name ph_ch_en.

Phoneme selection

DD1 - enD

This property is of type True or false and can be referenced with the variable name ph_dd1_en.

Phoneme selection

DD2 - Down

This property is of type True or false and can be referenced with the variable name ph_dd2_en.

Phoneme selection

DH1 - THey

This property is of type True or false and can be referenced with the variable name ph_dh1_en.

Phoneme selection

DH2 - baTHe

This property is of type True or false and can be referenced with the variable name ph_dh2_en.

Phoneme selection

EH - Extent

This property is of type True or false and can be referenced with the variable name ph_eh_en.

Phoneme selection

EL - angLE

This property is of type True or false and can be referenced with the variable name ph_el_en.

Phoneme selection

ER1 - intERupt

This property is of type True or false and can be referenced with the variable name ph_er1_en.

Phoneme selection

ER2 - bIRd

This property is of type True or false and can be referenced with the variable name ph_er2_en.

Phoneme selection

EY - grEAt

This property is of type True or false and can be referenced with the variable name ph_ey_en.

Phoneme selection

FF - Food

This property is of type True or false and can be referenced with the variable name ph_ff_en.

Phoneme selection

GG1 - Get

This property is of type True or false and can be referenced with the variable name ph_gg1_en.

Phoneme selection

GG2 - Green

This property is of type True or false and can be referenced with the variable name ph_gg2_en.

Phoneme selection

GG3 - anGer

This property is of type True or false and can be referenced with the variable name ph_gg3_en.

Phoneme selection

HH1 - Help

This property is of type True or false and can be referenced with the variable name ph_hh1_en.

Phoneme selection

HH2 - Hope

This property is of type True or false and can be referenced with the variable name ph_hh2_en.

Phoneme selection

IH - sIt

This property is of type True or false and can be referenced with the variable name ph_ih_en.

Phoneme selection

IY - trEAt

This property is of type True or false and can be referenced with the variable name ph_iy_en.

Phoneme selection

JH - inJure

This property is of type True or false and can be referenced with the variable name ph_jh_en.

Phoneme selection

KK1 - Clown

This property is of type True or false and can be referenced with the variable name ph_kk1_en.

Phoneme selection

KK2 - tasK

This property is of type True or false and can be referenced with the variable name ph_kk2_en.

Phoneme selection

KK3 - Crane

This property is of type True or false and can be referenced with the variable name ph_kk3_en.

Phoneme selection

LL - Lake

This property is of type True or false and can be referenced with the variable name ph_ll_en.

Phoneme selection

MM - Milk

This property is of type True or false and can be referenced with the variable name ph_mm_en.

Phoneme selection

NG - aNGer

This property is of type True or false and can be referenced with the variable name ph_ng_en.

Phoneme selection

NN1 - thiN

This property is of type True or false and can be referenced with the variable name ph_nn1_en.

Phoneme selection

NN2 - Now

This property is of type True or false and can be referenced with the variable name ph_nn2_en.

Phoneme selection

OR - stORe

This property is of type True or false and can be referenced with the variable name ph_or_en.

Phoneme selection

OW - zOne

This property is of type True or false and can be referenced with the variable name ph_ow_en.

Phoneme selection

OY - nOIse

This property is of type True or false and can be referenced with the variable name ph_oy_en.

Phoneme selection

PP - triP

This property is of type True or false and can be referenced with the variable name ph_pp_en.

Phoneme selection

RR1 - WRite

This property is of type True or false and can be referenced with the variable name ph_rr1_en.

Phoneme selection

RR2 - gRease

This property is of type True or false and can be referenced with the variable name ph_rr2_en.

Phoneme selection

SH - SHip

This property is of type True or false and can be referenced with the variable name ph_sh_en.

Phoneme selection

SS - teSt

This property is of type True or false and can be referenced with the variable name ph_ss_en.

Phoneme selection

TH - THin

This property is of type True or false and can be referenced with the variable name ph_th_en.

Phoneme selection

TT1 - tesT

This property is of type True or false and can be referenced with the variable name ph_tt1_en.

Phoneme selection

TT2 - Test

This property is of type True or false and can be referenced with the variable name ph_tt2_en.

Phoneme selection

UH - bOOk

This property is of type True or false and can be referenced with the variable name ph_uh_en.

Phoneme selection

UW1 - cumpUter

This property is of type True or false and can be referenced with the variable name ph_uw1_en.

Phoneme selection

UW2 - fOOd

This property is of type True or false and can be referenced with the variable name ph_uw2_en.

Phoneme selection

VV - Vest

This property is of type True or false and can be referenced with the variable name ph_vv_en.

Phoneme selection

WH - WHite

This property is of type True or false and can be referenced with the variable name ph_wh_en.

Phoneme selection

WW - Work

This property is of type True or false and can be referenced with the variable name ph_ww_en.

Phoneme selection

XR - haiR

This property is of type True or false and can be referenced with the variable name ph_xr_en.

Phoneme selection

YR - clEAR

This property is of type True or false and can be referenced with the variable name ph_yr_en.

Phoneme selection

YY1 - compUter

This property is of type True or false and can be referenced with the variable name ph_yy1_en.

Phoneme selection

YY2 - Yes

This property is of type True or false and can be referenced with the variable name ph_yy2_en.

Phoneme selection

ZH - aZure

This property is of type True or false and can be referenced with the variable name ph_zh_en.

Phoneme selection

ZZ - phaSe

This property is of type True or false and can be referenced with the variable name ph_zz_en.

Phoneme selection