Hello,
two technical questions:
1- how to clear the “backpack”?
2- for the “Texttospeech” component, where do we find the values for country, languages, pitch and speechrate?
Thanks
Hi @papoudu34,
To clear the backpack, you can right click (or ctrl+click on Mac) on the backpack icon and select “Empty the backpack” to clear it.
For the TextToSpeech component, you can use the AvailableLanguages and AvailableCountries blocks to get that information (e.g., by using “Do It”). Supported languages and countries will vary by device and OS version. Pitch and SpeechRate are documented in the reference: http://ai2.appinventor.mit.edu.ezproxy.canberra.edu.au/reference/components/media.html#TextToSpeech
Regards,
Evan
Hi,
Thanks ewpatton. OK for backpack. But for TextToSpeech component, I do not understand either AvailableCountries or “Do It”. Could you develop?
Thanks
The TextToSpeech
component speaks a given text aloud. You can set the pitch and the rate of speech.
You can also set a language by supplying a language code. This changes the pronunciation of words, not the actual language spoken. For example, setting the Language
to French and speaking English text will sound like someone speaking English (en) with a French accent.
You can also specify a country by supplying a Country
code. This can affect the pronunciation. For example, British English (GBR) will sound different from US English (USA). Not every country code will affect every language.
The languages and countries available depend on the particular device, and can be listed with the AvailableLanguages
and AvailableCountries
properties.
Properties
AvailableCountries
List of the country codes available on this device for use with TextToSpeech. Check the Android developer documentation under supported languages to find the meanings of these abbreviations.
AvailableLanguages
List of the languages available on this device for use with TextToSpeech. Check the Android developer documentation under supported languages to find the meanings of these abbreviations.
Country
Country code to use for speech generation. This can affect the pronunciation. For example, British English (GBR) will sound different from US English (USA). Not every country code will affect every language.
Language
Sets the language for TextToSpeech. This changes the way that words are pronounced, not the actual language that is spoken. For example, setting the language to French and speaking English text will sound like someone speaking English with a French accent.
Pitch
Sets the speech pitch for the TextToSpeech.
The values should be between 0 and 2 where lower values lower the tone of synthesized voice and greater values raise it.
The default value is 1.0 for normal pitch.
If you request the device list of language you will e something like this in the form of a List which are the language information required to make the TextToSpeech ‘sound’ right for the read back of text.
the List highlighted in red. These are standard abbreviations.The country list your device is capable of handling is the green (using abbreviations)
Here is an example how you can check language/country available in your phone and examples on how to force the TTS to speak correctly if the text is in English or Belgian French:
TTS languae and country codes are explained further here
Thanks SteveJG for your help.
Things are now clearer!
However if the traduction is ok, the accent (language/country) are inexistant. Here is what I am doing :
- on screen, TextToSpeechEn GBR,en
- on blocs
What is not working?
Thanks and have a nice day
Thanks everybody. All is solved.
Have a nice confinement everywhere