Speak: Difference between revisions
(Undo revision 225151 by 98.238.209.128 (Talk)) |
|||
Line 30: | Line 30: | ||
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 == |
== 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. |
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 === |
|||
Feel free to contact me if you require further information: msaunders@hpedsb.on.ca |
|||
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) === |
|||
From Josh Minor (Speak activity creator) |
|||
I built Speak so that it would query the available list of 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, then Speak should pick up the new language automatically. What the above means is that no modification is required to the actual Speak activity. |
|||
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> |
|||
Then run the Speak Activity, Mohawk should appear as an option, and it should work. |
|||
=== 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: |
|||
#: <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 = |
Revision as of 15:55, 12 August 2010
|
= Speak = Speak is a talking face for the XO laptop. = = Hablar Speak es una conversación cara a la portátil XO. Anything you type will be spoken aloud using the XO's speech synthesizer, espeak. Cualquier cosa que escriba se habla en voz alta utilizando el XO de la sintetizador de voz, espeak. You can adjust the accent, rate and pitch of the voice as well as the shape of the eyes and mouth. Usted puede ajustar el acento, el ritmo y el tono de la voz, así como la forma de los ojos y la boca. 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. 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.
Screenshot
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)
From Josh Minor (Speak activity creator) I built Speak so that it would query the available list of 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, then Speak should pick up the new language automatically. What the above means is that no modification is required to the actual Speak activity.
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/
Then run the Speak Activity, Mohawk should appear as an option, and it should work.
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.
- 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).
- 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.
- 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.
- 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.
- 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
- 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: |