Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: djx on November 24, 2010, 01:44:41 PM

Title: my custom built voice file won't work properly
Post by: djx on November 24, 2010, 01:44:41 PM
I'm trying to create my own voice file for iPod Nano 1g. Using rb3.7. I've tried the rockbox utility (latest ver on windows7 x86), but when it's encoding the files I get an error that it can't encode a certain file (it varies each time), and it won't go any further. So I'm doing it my way. I can successfully create the voice file, however when I install it on my iPod, everything except the main menu and some of the settings menu items speak incorrectly. The voice speaks, however it's not the same thing that is being displayed on screen.
 
Here's what I've done so far:
 
created my own VBScript that handles everything: the reading/recording of the voice strings with personal tts, making the wave files with the lang id names, encoding with speex, then finally compiling it all into  a voice file using the VoiceFont.exe application, which I downloaded from the svn and compiled myself, to ensure latest version.
I used the genlang script with the -o switch to generate a list of voice and id strings to feed my script for creation. It's worth noting that I took the info found on my rockbox-info.txt file for the target id (14), and for the target I put ipodnano1g: and the list of features found in that same file.
I'm using the latest english.lang from the source, I also compiled it into an lng using the genlang script, replaced my iPod's version with this new 1, but still no go, most items are still spoken incorrectly.
I even created a voice file with all 808 strings in it, even the silent ones, thinking it was some sort of id missmatch problem, still no go...

I'm not sure where the problem is, there are so many variables to alter, and not much documentation or up-to-date information is available. For example, is this VoiceFont utility still usable? What is the best way to extract and generate the voice clips from the lang file, I mean how do i know what strings I'll need for my player or not, should I encode them all or what. Do I have the right target id and such?
I guess I'm just looking to see where my problem is so i can try and solve it.
 
I've spent countless hours looking over the net and on the rb site for info on the lang file format, the voices and all that, and I managed to get where I'm at, but now I'm sort of stuck. Anybody have any ideas, comments or suggestions? Any info is greatly appreciated!
 
P.S. The original english.voice file for 3.7 works perfectly, but I'd rather use another tts.
 
THX, D!J!X!
Title: Re: my custom built voice file won't work properly
Post by: pixelma on November 25, 2010, 02:56:03 PM
This sounds like a mismatch between the lang file version on target and the one used for creating the voice file (they'll probably have different amount of strings).

I have to say that I can't fully follow what you are doing exactly as you are doing many "non-standard" things.

The only bit I know is that there already are VBscripts for building voice files but can't give you details, maybe someone else could help out. Another thing would be to try and find out why the Rockbox Utility hangs in your case, please give more details.
Title: Re: my custom built voice file won't work properly
Post by: djx on November 27, 2010, 05:12:36 AM
I got it to work, I looked at the source code for voicefont to see how it worked, and discovered that instead of feeding the original english.lang file to voicefont, i should have fed it the list of ids produced from the genlang script. It's working now!!!

Regarding the VBScript, I downloaded the 1 from the voice how-to wiki, it wasn't working for me, even after I modified it to use the proper voice etc. So I just wrote my own small script to handle it all for me. So now whenever there's a new update to the files, i just copy the new english.lang file to my folder and run the script, it does the rest! It just follows the procedures outlined on that same page, speaks the strings, makes wave files, trims then using wavtrim, encodes them using rbspeexenc and creates the voice file using voicefont.

Regarding rockbox utility, I've ran it on 2 win7 computers, same result. It begins voicing strings and doing all that, it starts encoding files, but somewhere around 55-60% it gives an error about not being able to encode a wa file. The file always changes, it's not the same 1. Then it says cleaning up and finishes with no voice created. While making my own, I found that wavtrim doesn't encode certain files which are empty, they show up as "" on the strings list. Maybe this is why rbutil is giving me errors? I just had my script take voice_pause.wav and make copies of it with the names of the empty strings which then rbspeexenc did encode the pause files. Not sure what's going on, not sure if i can just leave those strings out or what. When i get another chance I'll mess with it again and see, however it's working fine now, so no need to mess with it :)

Sorry if I'm not following standard procedures here, I figured if it didn't work like it should the normal way, then I'd make it work my way... Being visually impaired the only reason I got rb was to have speaking menus and such, so it kind of sucked that it wasn't working; sorry, but as an engineer, my brain is programmed in such way that when something doesn't work I come up with ways to make it work :)

THX, D!J!X!
Title: Re: my custom built voice file won't work properly
Post by: Chronon on November 27, 2010, 05:43:28 PM
If you can clarify the instructions and/or provide an alternate way to generate the resources, you are welcome to make appropriate changes to the wiki.