release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > DocsIndex > VoiceFiles > VoiceHowto

How to make your Rockbox-enabled player speak



Voiced menus

Voiced menus, directory names, and filenames come in handy not only for visually impaired users but for anybody when the screen can't be seen (while driving, when the player is inside your coat pocket, etc).

For Rockbox to speak, you must have a voice file installed for your particular language. The voice file for English is called "english.voice", the German voice is called "deutsch.voice", and so on. A variety of voice files can be downloaded either from the Voice Files wiki page and a standard English voice file is available for all players on the Daily builds page. (Please note that the files may need to be renamed after downloading as per the format described above).

You can also generate your own voice file using RockboxUtility or through the build system.

Make a "langs" directory, if such a directory doesn't exist already, inside the ".rockbox" directory of your player and put the "language.voice" file in it. Then disconnect your player and boot into Rockbox; you should now have talking menus. If not, check the voice settings menu to see if they have been activated. Also, on some players, the menus are only voiced when the current song is stopped.



Voiced numbers or spelling for directories and files

You can have names announced by number (folder 1, folder 2, or file 1, file 2, etc.) or spelled , (M U S I C). Press MENU and select Settings /> General Settings /> Voice. Now amend the options "Voice Directories" and "Voice Filenames". You can set these features to "off," "numbers" or "spell".



Voiced names for directories and files

Rockbox doesn't have any internal text-to-speech capabilities, but you can have names spoken properly using pre-recorded clips named with a .talk extension.

In order to speak a directory name, Rockbox needs you to provide a file called
    _dirname.talk
inside that directory. (That is literally "_dirname.talk", not matching the name of the directory!)

In order to speak a filename, e.g., "technoMix.mp3", Rockbox needs you to provide a file called
    technoMix.mp3.talk
in the same directory as the original technoMix.mp3 file. Remember the .talk filename must match the .mp3 filename exactly, dashes numbers spaces, everything, then tack on the ".talk" to your small clip of the song.

You must enable the "Use Directory .talk Clips" and "Use File .talk Clips" options which will then cause Rockbox to check for and "speak" the corresponding voice clip for the file or directory as you hover over it in the file browser. This can result in extra disk spin-ups, especially if you don't have dircache enabled.

The .talk files contain the spoken name of the directory or file. On Archos players, .talk files are normal MP3 files. On other players, they are in a Rockbox-specific Speex format produced by the rbspeexenc utility, which is distributed with Rockbox. If you have the software and patience, you can include a spoken announcement and a clip of the song (or whatever you'd like), although there is a limit on the size of the file.

If the .talk clip doesn't exist for a particular file or directory (or when browsing the database), Rockbox will fallback to using the numbered or spelled options, if configured.



Automated generation of .talk clips

The simplest way to generate .talk clips is to use RockboxUtility.

Alternatively, a script to automatically create the .talk files using a computer voice for directory and/or file names is available here:

voiceBox+.zip New version which supports both mp3 (for the Archos line of mp3 players) and raw speex (for all newer devices). Both GUI mode and plain drag & drop are tested working. Drag & drop onto links is untested, but should work as well.

The .zip archive comes complete with all required files, including the free LAME mp3 encoder.

Unzip the file into a handy directory ('C:\Program Files' for instance). A 'voiceBox' directory will be created containg the required files. You are now ready to run the voiceBox.hta application. This will start an HTML application with simple tick boxes to allow you to choose whether to voice directories and/or filenames and whether to keep existing .talk files (to only create voice files for new music) or to delete all and re-create. Depending on how many files and directories you are voicing, and the speed of your computer, the application should give you a success message in a short time - a few seconds for a few files and directories, several minutes for a larger collection of names. Please read the included file "voiceBox_README.txt" for more detailed instructions on how to configure the script, e.g., voicing only directories or files, but not both.

Alternatively, you can either drag files or directories onto the script (voiceBox.wsf). If no files are dropped on the script or specified on the command line, you will be asked to enter the name of a file or directory. You should enter the full pathname to the file or directory if you are using the command line or entering names at the script prompt.

If you get an error message from the script, or nothing seems to be happening at all, check if perhaps your virus scanner is blocking any scripting activity. If it is, you should temporarily disable this feature - do not forget to re-enable it after you have generated your .talk files! You might also want to look at the contents of the file "VoiceBox_logfile.txt", which contains a list of the files and directories processed and the commands that the script attempted to execute.

You will also need to have a text-to-speech engine installed on your Windows PC. I believe this comes as standard with Windows XP and above. If the voiceBox application indicates that 'Microsoft Speech' is not installed, then you will have to download and install it from the microsft.com website.

Linux: Another solution is the console utility talk.gz which recursively creates language specific .talk files. It uses Mary TTS and dictionary files.

Once the clip generation process is completed, disconnect the jukebox and reboot it as usual.



Modifying the voice's language settings

It is possible to get your Jukebox to read files and directories in several languages. This may be preferable if some artist names or song titles are in a language other than English, which will be hard to understand if your language is set to US English.

You will need to change the settings of the voiceBox script to the new language and change the Windows standard language, as well. This requires that you have more than the XP-standard "Microsoft Sam" voice installed on your computer.

If you don't, one way is to first got to http://www.microsoft.com/reader/downloads/pc.asp and download and install Microsoft Reader (no need to activate when prompted unless you want buy eBooks) if you don't already have it. Then download and install additional text-to-speech packages in other languages from http://www.microsoft.com/reader/developers/downloads/tts.asp.

Next change go to your control panel and change to the standard language to the one you prefer (Microsoft reader packages come with both a male and a female voice for each language).

Then change the settings in the "VoiceUtils.vbs" file. There, you will find the following line:

Set spkr.Voice = spkr.GetVoices("Language=409").Item(0)

You need to change the language ID (409 in this case) to the appropriate hex code for your desired language.

The ID's I know of (lifted from http://www.mmbforums.com/modules.php?name=Forums&file=viewtopic&p=22280) are:

Arabic (Saudi) = 401
Basque = 42d
Chinese (Simplified) = 804
Chinese (Traditional) = 404
Croatian 0x041A 
Polish = 415
Czech = 405
Danish = 406
Dutch = 413
English (British) = 809
English (US) = 409
Finnish = 40B
French = 40C
German = 407
Greek = 408
Hebrew = 40D
Hungarian = 40E
Italian = 410
Japanese = 411
Korean = 412
Norwegian = 414
Portuguese (Portugal) = 816
Portuguese (Brazil) = 416
Russian = 419
Slovakian = 41B
Slovenian = 424
Spanish = C0A
Swedish = 41D
Thai = 41E
Turkish = 41F

You are now ready to drag and drop the directories you want to have voiced in the new language onto the voiceBox.wsf file as described above. If you have already voiced the files with another language before you will either need to delete the relevant .talk files from your Jukebox or change the voiceBox settings so that old files will be overwritten (default setting is that files and directories with existing .talk files will be skipped). See the voiceBox documentation for this. However, don't forget to change the settings back later, or voiceBox will always update all .talk files when you have only added a few new songs that you want voiced.

If you want a third language on your Jukebox go back and change the language settings again and do it over with the next set of directories and files.

Good luck!


CategoryBlindUsers: How to make your player speak
r32 - 04 Jan 2012 - 22:38:18 - MichaelArlt?
Copyright by the contributing authors.