Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#7646 - Perl voicebuilding

Attached to Project: Rockbox
Opened by Jonas Häggqvist (rasher) - Wednesday, 22 August 2007, 23:59 GMT+2
Last edited by Jonas Häggqvist (rasher) - Sunday, 26 August 2007, 00:15 GMT+2
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This is the first attempt to port the current voice scripts to perl. The benefits are/should be numerous:
- Should give a huge speedup on Cygwin
- Also gives a nice speedup in Linux & relatives.
- Should allow better use of SAPI (it might be possible to keep a single connection open)
- Perl, as horrible as it is, is probably more hacker-friendly than shell for large jobs, and should hopefully allow more people to help out.
- The configure script looks slightly nicer. And voice building is better integrated.
- voice.pl is a single file and can be run directly from the commandline. In theory all that's needed is voicefont, genlang, english.lang and the appropriate language-file.

There are still some caveats though:
- The reason for this re-implementation was to allow TTS tweaks (phonetical replacements) - I have not added this yet.
- The script should eventually allow .talk clip generation as well. This is not yet implemented.

Given how much brouhaha the last voice change generated, I wonder if this should get a mention on either of the mailing lists? Thoughts?
   perl-voice-building.diff (12.2 KiB)
 tools/configure |   39 ++++-----
 tools/voice.pl  |  239 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 258 insertions(+), 20 deletions(-)

This task depends upon

Closed by  Jonas Häggqvist (rasher)
Sunday, 26 August 2007, 00:15 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Commmitted in r14457
Comment by Jonas Häggqvist (rasher) - Thursday, 23 August 2007, 00:03 GMT+2
I also forgot, probably most importantly:
- SAPI5 building isn't implemented yet. This should definitely be done before even considering committing this. If someone with a clue about Windows/SAPI5 could do this, I'd very much appreciate it.
Comment by Jonas Häggqvist (rasher) - Friday, 24 August 2007, 14:50 GMT+2
Updated patch that adds the following:
- Responds to V=1 being set (call "V=1 make voice" to see details during build)
- Shows a bit of information about what's being built
- Shows progress indicator
- An attempt at SAPI5 building (still just calls the .vbs over and over - someone could probably improve this)

Please test and report back - especially SAPI5 voice building.
Comment by Jonas Häggqvist (rasher) - Friday, 24 August 2007, 14:51 GMT+2
And I of course forgot the file.
   perl-voice-building-v2.diff (13 KiB)
 tools/configure |   39 ++++----
 tools/voice.pl  |  258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 277 insertions(+), 20 deletions(-)

Comment by Jonas Häggqvist (rasher) - Friday, 24 August 2007, 16:51 GMT+2
Update:
- Add sapi5_voice_new.vbs - accepts alternating lines of string and filename on stdin and voices the string into filenames. Exits when filename is blank.
- Use this script for SAPI5 building - this greatly speeds up voicefile generation in Cygwin (launching LAME many times still takes time, but there's probably not much that can be done about that).
   perl-voice-building-v3.diff (16 KiB)
 tools/voice.pl            |  263 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/configure           |   39 +++---
 tools/sapi5_voice_new.vbs |   67 +++++++++++
 3 files changed, 349 insertions(+), 20 deletions(-)

Comment by Bryan Childs (GodEater) - Friday, 24 August 2007, 17:49 GMT+2
Works fine on linux here (Gentoo if it matters). Got about a 20 second speed increase too.
Comment by Jonas Häggqvist (rasher) - Saturday, 25 August 2007, 01:44 GMT+2
Update:
- Add possibility to do regexp search&replace on strings
- Special handling of VOICE_PAUSE (this file is added to the tools/ dir
- Add wavtrim step
- Fix tools/Makefile to remove voicefont and wavtrim when running make clean (not related, to be honest)
- Save the voicefile to a different filename instead of overwriting an existing voicefile of the same name

I created a section on the VoiceBuilding wikipage for keeping track of this patch.
   perl-voice-building-fs7646-v4.diff (19.1 KiB)
 tools/Makefile            |    2 
 tools/voice.pl            |  336 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/configure           |   39 ++---
 tools/sapi5_voice_new.vbs |   67 +++++++++
 4 files changed, 423 insertions(+), 21 deletions(-)

   voice_pause.wav (26 KiB)
Comment by Jonas Häggqvist (rasher) - Saturday, 25 August 2007, 14:20 GMT+2
Two tiny (but somewhat important changes)
- Fix the call to voicefont to properly include the target id
- Change the default lame settings to include -B 64 and --vbr-new
   voice_pause.wav (26 KiB)
   perl-voice-building-fs7646-v5.diff (19.2 KiB)
 tools/Makefile            |    2 
 tools/voice.pl            |  337 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/configure           |   39 ++---
 tools/sapi5_voice_new.vbs |   67 +++++++++
 4 files changed, 424 insertions(+), 21 deletions(-)

Comment by Jonas Häggqvist (rasher) - Saturday, 25 August 2007, 23:51 GMT+2
This should be my final version. Changes in this version:
- Building of multiple voices disabled (it wasn't implemented properly, so I'll have a go at it after this has been committed)
- The voice script now cleans up after itself if interrupted
- Changing of default options for festival based on which language is selected, the same could easily be done for other engines.
   perl-voice-building-fs7646-v6.diff (20.7 KiB)
 tools/Makefile            |    2 
 tools/voice.pl            |  360 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/configure           |   58 ++++---
 tools/sapi5_voice_new.vbs |   67 ++++++++
 4 files changed, 465 insertions(+), 22 deletions(-)

Loading...