Speak: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
m (Reverted edits by 108.194.167.82 (Talk) to last revision by Patrol)
 
(54 intermediate revisions by 31 users not shown)
Line 1: Line 1:
[[Category:Game]]
[[Category:Games]]


{{olpcboxtop|toptext=[[{{PAGENAME}}|Speak]]}}
{{Status box
| activity = Speak
{{ OBX activity | [[Image: Activity-Speak.svg|40px]]|extra}}
{{ OBX source dev|activities/speak}}
| icon = Activity-Speak.svg
{{ OBX xobundle|http://wiki.laptop.org/images/d/d1/Speak-9.xo|Speak-9}}
| status = Under development
{{ OBX devtickets |speak-activity}}
| version = 5
{{ OBX pootle|1=http://dev.laptop.org/git?p=activities/speak;a=blob_plain;f=Speak.activity/po/activity.pot;hb=HEAD}}
| base = No
{{ OBX team | [[User:Jminor|Josh Minor]]}}
| source = http://dev.laptop.org/git?p=activities/speak
{{olpcboxbottom}}
| contributors = [[User:Jminor|Josh Minor]]

}}
= Speak =
Speak is a talking face for the XO laptop.
Anything you type will be spoken aloud using the XO's [[Speech_synthesis|speech synthesizer]], espeak.
You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth.
This is a great way to experiment with the speech synthesizer, learn to type or just have fun making a funny face for your XO.

Hablar es una conversación cara a la portátil XO.
Cualquier cosa que escriba se habla en voz alta utilizando el XO de la [[Speech_synthesis | sintetizador de voz]], espeak.
Usted puede ajustar el acento, el ritmo y el tono de la voz, así como la forma de los ojos y la boca.
Esta es una gran manera de experimentar con el sintetizador de voz, aprender a escribir o simplemente divertirse haciendo un divertido rostro de su XO.


= Speak =
Speak is a talking face for the XO laptop. Anything you type will be spoken aloud using the XO's [[Speech_synthesis|speech synthesizer]], espeak. You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth. This is a great way to experiment with the speech synthesizer, learn to type or just have fun making a funny face for your XO.


= Screenshot =
[[Image:SpeakActivity.png|320px]] [[Image:SpeakActivity2.png|320px]]
[[Image:SpeakActivity.png|320px]] [[Image:SpeakActivity2.png|320px]]


= Instructions =
= Instructions =
== How to install ==
Download this .xo file from the Browse activity: [[Media:Speak-5.xo|Speak-5.xo]]


== How to install ==
If you have an older version, you'll need to delete it before you can download the new version. There are instructions here: [[Activity_Upgrade]]
Download this .xo file from the Browse activity: [[Media:Speak-9.xo|Speak-9.xo]] Then follow the steps here: [[Activity_installation]] If you have an older version, you'll need to delete it before you can download the new version - or if you have a recent version of Sugar, you can just use the Control Panel's Software Update feature and it will upgrade Speak for you.

You can also use [[xo-get]] to install and/or upgrade Speak (as well as many other activities).


== How to play ==
== How to play ==
Line 34: Line 38:
== How to develop ==
== How to develop ==
Speak is free software, licensed under the [[GPL]]. It is partially based on Arjun Sarwal's code from Measure and of course relies heavily on the wonderful speech synthesizer espeak. You can find the source code inside the .xo bundle or here: http://dev.laptop.org/git?p=activities/speak . If you have suggestions or contributions feel free to leave a comment on the discussion page [[Talk:Speak]].
Speak is free software, licensed under the [[GPL]]. It is partially based on Arjun Sarwal's code from Measure and of course relies heavily on the wonderful speech synthesizer espeak. You can find the source code inside the .xo bundle or here: http://dev.laptop.org/git?p=activities/speak . If you have suggestions or contributions feel free to leave a comment on the discussion page [[Talk:Speak]].

== How to add a new language to Speak ==
Two students at Moira Secondary School in Belleville, Canada, worked on adding the Mohawk language to the Speak activity. Below are the details of how this worked; see also the [[Media:Adding_mohawk_Speak_activity.zip|Mohawk zip file]] for both the '''moh''' voice / dict / rules files and the instructions below.

=== Background ===
The Speak activity on the XO laptop uses the espeak text to speech synthesis software written by Jonathan Duddington (http://espeak.sourceforge.net/)
As a final project in June 2007, msaunders asked two high school students at [http://www.hpedsb.on.ca/mss Moira Secondary School], Belleville, Ontario, to research and attempt to implement the Mohawk language on the XO laptop.

=== Compiling a rules file for a new language ===
We started with espeak and espeakedit (available from the link above) The students, Eric Green and Aaron Basset developed a rules file for the Mohawk language. They were successful in compiling the rules file (''moh_rules'') into the dictionary file (''moh_dict'') that espeak uses. At this point we were using a Windows workstation, but it can be done directly on an XO.

We ran into difficulties attempting to port the Mohawk language on the XO Laptop. We received prompt assistance from both Jonathan Duddington (espeak creator) and Josh Minor (writer of the Speak sctivity). When I finally got around to documenting my students' experiences, it occurred to me it would be useful if the whole process could take place on an XO laptop, e.g. creating rules file,
voice file and then compiling the dict file. After a little experimentation I discovered this was possible.

=== Adding a language to one XO (does not add it to the activity bundle) ===

Additional language files just need to be in the right place.
If you copy the moh_dict file to the following directory:
:<tt>/usr/share/espeak-data/</tt>
Then copy the moh voice file to the following directory:
:<tt>/usr/share/espeak-data/voices/</tt>

You can query the list of available languages by running "<tt>espeak --voices</tt>" from the command line. When you use the Terminal on your XO, try running that command to see if it lists the new language.

If it does, and you have an older version of Speak then it should pick up the new language automatically without any modification to the actual Speak activity.

Newer versions of Speak use the gst-plugins-speak module instead of the espeak command line tool. That module copies a chunk of espeak's configuration to an obscure place the first time Speak is launched. That means that new languages won't show up in Speak automatically. You can make them show up by following the steps above and then removing and re-installing Speak. (Thanks to Christopher Naylor at MIT for figuring this out while adding the Haitian language.)

Then run the Speak Activity and the new language should appear as an option in the voices menu.

=== Creating voice, rules, and dict files ===
What is in a voice file??
The ''moh'' voice file contains the following:
<pre>
name mohawk
language moh
gender male
</pre>

The ''moh_dict'' file is a compiled file (compiled from ''moh_rules'').

We used the Windows version of '''espeakedit''' to do this.

=== Compiling rules on the XO ===
If you want to create a new language using only the XO laptop, this is also possible. Use the simple text editor ''vi'' to create both the voice file and the rules file.

# Create a new voice file in the directory <tt>/usr/share/espeak-data/voices/</tt> :
#: Type: <tt>vi [''lang'']</tt> where ''lang'' is the short language code for your language, and follow the same format as used in the ''moh'' voice file (see above).
#:
# Create a new rules file in the following directory <tt>/usr/share/espeak-data/</tt>
#: Type: vi <tt>[''lang''_rules]</tt>
#: My students found thatcopying an existing rules file, renaming it and modifying it was easiest.
#:
# Compile the ''lang''_rules</tt> file into a <tt>''lang''_dict</tt> file
#: In the /usr/share/espeak-data/ directory, execute the following command:
#: &nbsp; <tt>espeak --compile=''lang''</tt>
#: This will create a <tt>''lang''_dict</tt> file in the same folder.
#:
# Now reboot the machine, and run <tt>espeak --voices</tt> from the terminal to see if the new language has been recognized. If so, you can run Speak and teset it out.
#:
# Don't forget to publish your voices file to this wiki, and share your experiences here!


(you can find help with ''vi'' [http://www.cs.colostate.edu/helpdocs/vi.html online]. To edit an existing file, type <tt>vi [nameOfExisitingFile]</tt>.)

=== Feedback ===
Feedback/questions? write to msaunders@hpedsb.on.ca


= Release Notes =
= Release Notes =
* v9
Updated license information.
* v8
Only change from v7 is a different name in Spanish language activity bars
* v5
* v5
Speak now uses the default locale of the laptop to pick the default voice accent.
Speak now uses the default locale of the laptop to pick the default voice accent.
Line 52: Line 127:
= Testing =
= Testing =


[[Media:Speak-5.xo|Speak-5.xo]] has been tested on build 690 under emulation as well as on a G1G1 running 656.
Speak v9 has been tested on build 8.2-760.
Speak v5 has been tested on build 690 under emulation as well as on a G1G1 running 656.


Thanks to Troy Ihmels for beta testing for me.
Thanks to Troy Ihmels for beta testing for me.


= Reviews =
= Reviews =
An extremely fun activity. The developer did a great job of using the speech capabilities of the app to make it easy for the user to start playing. Great job incorporating the accents for different languages. This is one of the best speech apps I've seen in a while. - Paul Russell


Read a [http://www.olpcnews.com/software/applications/xo_speak_speech_synthesis.html review by Wayan Vota on OLPC News] (with [http://revver.com/video/761721/xo-speak-for-one-laptop-per-child/ video demonstration by a child])

Here is an article from Chile's Un Computador por Niño web site [http://ucpn.cl/2008/03/23/aplicaciones-educativas-en-el-olpc-sintetizador-de-voz/ Aplicaciones educativas en el OLPC: Sintetizador de voz] (translated [http://translate.google.com/translate?u=http%3A%2F%2Fucpn.cl%2F2008%2F03%2F23%2Faplicaciones-educativas-en-el-olpc-sintetizador-de-voz%2F&langpair=es%7Cen&hl=en&ie=UTF8 into English via Google])

An extremely fun activity. The developer did a great job of using the speech capabilities of the app to make it easy for the user to start playing. Great job incorporating the accents for different languages. This is one of the best speech apps I've seen in a while. - Paul Russell


Best Activity I've found for the XO so far! My niece will love it!!! Great Job! - Dwight Harvey
Best Activity I've found for the XO so far! My niece will love it!!! Great Job! - Dwight Harvey
Line 69: Line 149:


= Feature requests =
= Feature requests =

* Can we somehow name the interface? When my daughter asks his name. he says he doesnt want to talk about it. He needs a name, maybe Ollie or Nomad. Also, he can't tell the date or time even though it is set on the laptop. My daughter likes to ask him questions, but there are so few he can answer. A name and age and things he likes would be a great start.

* Is there an espeak voice with an American accent? If so, can you add that in the next version of Speak?

* It would be nice to have the ability to export selected phrases as sound files.

* Enable a caps lock feature. When teaching kids letters, it's confusing that the letter on the board is not the letter that shows up on screen (A makes a). The XO doesn't have that key, so it needs to be software-based.
** This should be pretty easy to do. There is already a callback that moves the eyes whenever someone types. Simply replacing the full text with an uppercased version should work. I don't have time to work on this at the moment, but you can give it a try. I wouldn't want to make this the default since more advanced students will need to learn the correspondence between upper and lower case anyways, but I could see it as an option. Hopefully the python string.upper() command does the right thing in all languages. [[User:Jminor|jminor]]

* espeak has the ability to speak with female voice. Adding an option to choose either male or female voice will be welcome.
** I would love to add this, but my testing of espeak led me to believe that the option didn't work. I'll check again next time I work on Speak. [[User:Jminor|jminor]]


* Languages should be written as native, not in English: Français rather than French, Deutsch rather than German etc. And probably some generic sound rather than words in English to test the two cursors.
* Languages should be written as native, not in English: Français rather than French, Deutsch rather than German etc. And probably some generic sound rather than words in English to test the two cursors.
Line 91: Line 183:
* What happens when speak is shared with the neighborhood? Is there some way to integrate it so that users can make each other's laptops talk across distances? This would enable speak to be used as a simple chat for blind users. -Lesley
* What happens when speak is shared with the neighborhood? Is there some way to integrate it so that users can make each other's laptops talk across distances? This would enable speak to be used as a simple chat for blind users. -Lesley
** I like this idea a lot! [[User:Cjb|Cjb]] 01:14, 22 March 2008 (EDT)
** I like this idea a lot! [[User:Cjb|Cjb]] 01:14, 22 March 2008 (EDT)
** Me too. I think Speak can only play one voice at a time, so they would need to take turns or queue up the sentences. When I type, your laptop should use my voice settings (pitch, accent, etc.) when it plays on yours. That way each person could have a distinct voice when chatting. Hopefully this will make its way into Chat as well once the system-wide text-to-speech system is in place. [[User:Jminor|jminor]]


[[Category:Software]]
[[Category:Software]]
[[Category:Speech Synthesis]]
[[Category:Speech Synthesis]]
{{Activity page
|icon=Image:Activity-Speak.svg
|genre=Games
|activity group=Activities/G1G1
|short description=Speak is a talking face for the XO laptop. Anything you type will be spoken aloud using the XO's speech synthesizer, espeak. You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth. This is a great way to experiment with the speech synthesizer, learn to type or just have fun making a funny face for your XO.
|contact person=User:Jminor
|activity source=http://dev.laptop.org/git?p=activities/speak
|bundle URL=http://wiki.laptop.org/images/d/d1/Speak-9.xo
|activity version=9
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656), 8.1.0 (703), 8.1.1 (708)
}}
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/d/d1/Speak-9.xo
|activity version=9
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656), 8.1.0 (703), 8.1.1 (708)
}}

==Related Links==

Latest revision as of 18:58, 13 July 2012


Activity-Speak.svg
.xo BundleSpeak-9.xo
Trac print.png Tickets all - active - new

Speak

Speak is a talking face for the XO laptop. Anything you type will be spoken aloud using the XO's speech synthesizer, espeak. You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth. This is a great way to experiment with the speech synthesizer, learn to type or just have fun making a funny face for your XO.

Hablar es una conversación cara a la portátil XO. Cualquier cosa que escriba se habla en voz alta utilizando el XO de la sintetizador de voz, espeak. Usted puede ajustar el acento, el ritmo y el tono de la voz, así como la forma de los ojos y la boca. Esta es una gran manera de experimentar con el sintetizador de voz, aprender a escribir o simplemente divertirse haciendo un divertido rostro de su XO.


SpeakActivity.png SpeakActivity2.png

Instructions

How to install

Download this .xo file from the Browse activity: Speak-9.xo Then follow the steps here: Activity_installation If you have an older version, you'll need to delete it before you can download the new version - or if you have a recent version of Sugar, you can just use the Control Panel's Software Update feature and it will upgrade Speak for you.

How to play

Type something and press Enter to hear it spoken aloud. Use the toolbars at the top to change the voice's accent, rate and pitch or the shape of the eyes and mouth. After you've adjusted the settings it looks nicer in full-screen mode (Press Alt-Enter to switch).

Use the up/down arrow keys to scroll back through a history of things you have typed, or click the arrow button at the bottom right.

Use the Journal to resume your Speak activity including all voice, face and history settings.

How to develop

Speak is free software, licensed under the GPL. It is partially based on Arjun Sarwal's code from Measure and of course relies heavily on the wonderful speech synthesizer espeak. You can find the source code inside the .xo bundle or here: http://dev.laptop.org/git?p=activities/speak . If you have suggestions or contributions feel free to leave a comment on the discussion page Talk:Speak.

How to add a new language to Speak

Two students at Moira Secondary School in Belleville, Canada, worked on adding the Mohawk language to the Speak activity. Below are the details of how this worked; see also the Mohawk zip file for both the moh voice / dict / rules files and the instructions below.

Background

The Speak activity on the XO laptop uses the espeak text to speech synthesis software written by Jonathan Duddington (http://espeak.sourceforge.net/) As a final project in June 2007, msaunders asked two high school students at Moira Secondary School, Belleville, Ontario, to research and attempt to implement the Mohawk language on the XO laptop.

Compiling a rules file for a new language

We started with espeak and espeakedit (available from the link above) The students, Eric Green and Aaron Basset developed a rules file for the Mohawk language. They were successful in compiling the rules file (moh_rules) into the dictionary file (moh_dict) that espeak uses. At this point we were using a Windows workstation, but it can be done directly on an XO.

We ran into difficulties attempting to port the Mohawk language on the XO Laptop. We received prompt assistance from both Jonathan Duddington (espeak creator) and Josh Minor (writer of the Speak sctivity). When I finally got around to documenting my students' experiences, it occurred to me it would be useful if the whole process could take place on an XO laptop, e.g. creating rules file, voice file and then compiling the dict file. After a little experimentation I discovered this was possible.

Adding a language to one XO (does not add it to the activity bundle)

Additional language files just need to be in the right place. If you copy the moh_dict file to the following directory:

/usr/share/espeak-data/

Then copy the moh voice file to the following directory:

/usr/share/espeak-data/voices/

You can query the list of available languages by running "espeak --voices" from the command line. When you use the Terminal on your XO, try running that command to see if it lists the new language.

If it does, and you have an older version of Speak then it should pick up the new language automatically without any modification to the actual Speak activity.

Newer versions of Speak use the gst-plugins-speak module instead of the espeak command line tool. That module copies a chunk of espeak's configuration to an obscure place the first time Speak is launched. That means that new languages won't show up in Speak automatically. You can make them show up by following the steps above and then removing and re-installing Speak. (Thanks to Christopher Naylor at MIT for figuring this out while adding the Haitian language.)

Then run the Speak Activity and the new language should appear as an option in the voices menu.

Creating voice, rules, and dict files

What is in a voice file?? The moh voice file contains the following:

 name mohawk
 language moh
 gender male

The moh_dict file is a compiled file (compiled from moh_rules).

We used the Windows version of espeakedit to do this.

Compiling rules on the XO

If you want to create a new language using only the XO laptop, this is also possible. Use the simple text editor vi to create both the voice file and the rules file.

  1. Create a new voice file in the directory /usr/share/espeak-data/voices/ :
    Type: vi [lang] where lang is the short language code for your language, and follow the same format as used in the moh voice file (see above).
  2. Create a new rules file in the following directory /usr/share/espeak-data/
    Type: vi [lang_rules]
    My students found thatcopying an existing rules file, renaming it and modifying it was easiest.
  3. Compile the lang_rules file into a lang_dict file
    In the /usr/share/espeak-data/ directory, execute the following command:
      espeak --compile=lang
    This will create a lang_dict file in the same folder.
  4. Now reboot the machine, and run espeak --voices from the terminal to see if the new language has been recognized. If so, you can run Speak and teset it out.
  5. Don't forget to publish your voices file to this wiki, and share your experiences here!


(you can find help with vi online. To edit an existing file, type vi [nameOfExisitingFile].)

Feedback

Feedback/questions? write to msaunders@hpedsb.on.ca

Release Notes

  • v9

Updated license information.

  • v8

Only change from v7 is a different name in Spanish language activity bars

  • v5

Speak now uses the default locale of the laptop to pick the default voice accent.

  • v4

You can now use the arrow keys or history popup to get back to old things you typed. All history, voice and face settings are saved in the Journal so you can resume right where you left off. Fixed some small drawing glitches. The eyes now follow the text cursor when you type. The eyes now look at you when speaking. Pressing Enter no longer clears the text entry area.

  • v3

Lots of performance improvements.

  • v2

First public release.

Testing

Speak v9 has been tested on build 8.2-760. Speak v5 has been tested on build 690 under emulation as well as on a G1G1 running 656.

Thanks to Troy Ihmels for beta testing for me.

Reviews

Read a review by Wayan Vota on OLPC News (with video demonstration by a child)

Here is an article from Chile's Un Computador por Niño web site Aplicaciones educativas en el OLPC: Sintetizador de voz (translated into English via Google)

An extremely fun activity. The developer did a great job of using the speech capabilities of the app to make it easy for the user to start playing. Great job incorporating the accents for different languages. This is one of the best speech apps I've seen in a while. - Paul Russell

Best Activity I've found for the XO so far! My niece will love it!!! Great Job! - Dwight Harvey

See also Talk:Speak

Bugs

There are intermittent performance problems, especially with long sentences. The toolbar sliders need icons or labels so you know what they do.

Feature requests

  • Can we somehow name the interface? When my daughter asks his name. he says he doesnt want to talk about it. He needs a name, maybe Ollie or Nomad. Also, he can't tell the date or time even though it is set on the laptop. My daughter likes to ask him questions, but there are so few he can answer. A name and age and things he likes would be a great start.
  • Is there an espeak voice with an American accent? If so, can you add that in the next version of Speak?
  • It would be nice to have the ability to export selected phrases as sound files.
  • Enable a caps lock feature. When teaching kids letters, it's confusing that the letter on the board is not the letter that shows up on screen (A makes a). The XO doesn't have that key, so it needs to be software-based.
    • This should be pretty easy to do. There is already a callback that moves the eyes whenever someone types. Simply replacing the full text with an uppercased version should work. I don't have time to work on this at the moment, but you can give it a try. I wouldn't want to make this the default since more advanced students will need to learn the correspondence between upper and lower case anyways, but I could see it as an option. Hopefully the python string.upper() command does the right thing in all languages. jminor
  • espeak has the ability to speak with female voice. Adding an option to choose either male or female voice will be welcome.
    • I would love to add this, but my testing of espeak led me to believe that the option didn't work. I'll check again next time I work on Speak. jminor
  • Languages should be written as native, not in English: Français rather than French, Deutsch rather than German etc. And probably some generic sound rather than words in English to test the two cursors.
    • I have added support for localization so that the language names can be translated. Volunteers welcome. jminor 12:42, 8 March 2008 (EST)
  • (fixed in v5) Set default language to another language than English.
    • Speak now uses the default locale of the laptop to pick the default accent. You can also save the settings you like in the Journal and resume that entry to start where you left off. jminor 12:39, 8 March 2008 (EST)
  • (fixed in v4) Speak should save your settings to the journal.
  • You should be able to draw/make new mouth and eye shapes.
  • The mouth shape should be driven by espeak's phonemes rather than the audio waveform.
    • The espeak API allows for per-phoneme callbacks which means that this should be possible. However my investigation leads me to believe that this would require significantly more time than I am able to invest in Speak. If you are interested in helping with this feature. Please contact me. jminor 02:29, 2 March 2008 (EST)
  • You should be able to make it sing.
  • (fixed in v4) Let the text scroll back so you can repeat something without retyping it.
  • My favorite list: My child name, the numbers. greetings, etc,... Pato Acevedo.
  • What happens when speak is shared with the neighborhood? Is there some way to integrate it so that users can make each other's laptops talk across distances? This would enable speak to be used as a simple chat for blind users. -Lesley
    • I like this idea a lot! Cjb 01:14, 22 March 2008 (EDT)
    • Me too. I think Speak can only play one voice at a time, so they would need to take turns or queue up the sentences. When I type, your laptop should use my voice settings (pitch, accent, etc.) when it plays on yours. That way each person could have a distinct voice when chatting. Hopefully this will make its way into Chat as well once the system-wide text-to-speech system is in place. jminor

Activity Summary

Icon: Sugar icon::Image:Activity-Speak.svg
Genre: Activity genre::Games
Activity group: ,|x|Activity group::x}}
Short description: [[Short description::Speak is a talking face for the XO laptop. Anything you type will be spoken aloud using the XO's speech synthesizer, espeak. You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth. This is a great way to experiment with the speech synthesizer, learn to type or just have fun making a funny face for your XO.]]
Description:
Maintainers: ,|x|Contact person::x}}
Repository URL: Source code::http://dev.laptop.org/git?p=activities/speak
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://wiki.laptop.org/images/d/d1/Speak-9.xo
Last tested version number: Activity version::9
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/d/d1/Speak-9.xo
Activity version number: Activity version::9
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:


Related Links