[tmp] Creating Shortcut Prompts - was RE: How I Got Rockbox to Speak Shortcut Menu Items

  • From: "Jim Hunt" <jhunt76@xxxxxxx>
  • To: <tmp@xxxxxxxxxxxxx>
  • Date: Tue, 22 Apr 2014 16:13:07 -0400

Hi Andrea (and all),

 

Yes Andrea, absolutely, you can replace the .talk files with those you
create with Amy or any other SAPI5 voice.  The way I do it is quite
involved.  There may be an easier way to go about it, but here's what I do:
Hold on to your hat, here we go, and read on for some clickety-clickable
Easter goodies from yours-truly.

 

Since I use Windows 7, I use Balabolka or the little Microsoft TTS SAPI5 app
executable to create the prompts in wave file format, writing the prompts
into the program's text field.  In your case, you would choose the Acapela
Amy voice.  You can download Balabolka from
http://www.cross-plus-a.com/balabolka.htm.  You can download the Microsoft
SAPI5 TTS App from https://www.firedrive.com/file/4E4F3770FF30DB6C.  Both
programs are free.

 

For the Time shortcut, have your SAPI5 voice speak this prompt:

Speak the current time and date

Save as: time.wav

 

For the first sleep timer shortcut, sleep30, have your SAPI5 voice speak
this prompt:

Set the Sleep Timer for 30 minutes

Save as: sleep30.wav

 

For the second sleep timer shortcut, sleep60, have your SAPI5 voice speak
this prompt:

Set the Sleep Timer for 1 Hour

Save as: sleep60.wav

 

For the third sleep timer shortcut, sleep120, have your SAPI5 voice speak
this prompt:

Set the Sleep Timer for Two Hours

Save as: sleep120.wav

 

Next, you'll need to convert those four wave files into .talk files.  What I
do is I use the little Rockbox Speex Encoder executable that comes packaged
with the Rockbox Utility or RBClip.  If you'd like to use it too and you
don't want to dig to get it, click on the following link to download a tiny
executable I put together called RBSpeexUnpack.exe:
https://www.firedrive.com/file/3F73DBAC9FE32082.  This program will place
the tiny Rockbox Speex Encoder in a directory on your computer called
C:\RBSpeex (That's C colon backslash RBSpeex.)  A file called ReadMe.txt
will also be copied to the C:\RBSpeex directory; this file explains how you
can use the RBSpeex encoder to convert wave files to .talk files.  I suggest
moving the four wave files you've created-time.wav, sleep30.wav, sleep60.wav
and sleep120.wav--into this new C:\RBSpeex directory.  See why in a bit.

 

OK, so you've run RBSpeexUnpack.exe and moved the four wave files you've
created to the new C:\RBSpeex directory on your computer.  Sweet.  Now .
it's time to play a bit with the command line.  (Told you this would get
involved.  A word to command-line novices: Be careful, the command-line is a
very powerful tool, especially if run elevated.)  The following assumes
you'll be working in a Windows OS.

1)      Hit Control-R to get into the Run box.

2)      Type cmd and press enter.  A new window will open and you will be at
the command prompt.

3)      Type CD\RBSpeex (that's CD backslash RBSpeex) and press enter.  This
will take you to the C:\RBSpeex directory.  Here we go, it's time to have
some fun.

4)      To convert time.wav to time.talk, type rbspeex time.wav time.talk
and press enter.  The RBSpeex encoder won't tell you anything, it works
silently, just wait a bit and you'll hear a prompt that says C:\RBSpeex.

5)      To convert sleep30.wav to sleep30.talk, type rbspeex sleep30.wav
sleep30.talk and press enter.  Wait to hear the C:\RBSpeex prompt.

6)      To convert sleep60.wav to sleep60.talk, type rbspeex sleep60.wav
sleep60.talk and press enter.  Wait to hear the C:\RBSpeex prompt.

7)      To convert sleep120.wav to sleep120.talk, type rbspeex sleep120.wav
sleep120.talk and press enter.  Wait to hear the C:\RBSpeex prompt.

8)      To exit the Command-line prompt, type exit and press enter.  The
command-line window will close.

9)      To check and see if the .talk files you've just created are there,
go to C:\RBSpeex in Windows Explorer.

For a zipped batch file that automates that entire process of converting the
four wave files to .talk files via the command-line, go here:

https://www.firedrive.com/file/A1019C31D3DF1265

 

There it is.  Hope all this helps.  Sorry it's so involved, wish I knew an
easier way, LOL.  If you have any questions, you can email me off-list.

 

Cheers,

Jim

 

From: tmp-bounce@xxxxxxxxxxxxx [mailto:tmp-bounce@xxxxxxxxxxxxx] On Behalf
Of Andrea Sherry
Sent: Tuesday, April 22, 2014 5:49 AM
To: tmp@xxxxxxxxxxxxx
Subject: [tmp] Re: How I Got Rockbox to Speak Shortcut Menu Items

 

Thanks much for that little surprise package.
One query?
If I create those .talk files using my voice of choice (which happens to be
Acapella Amy) can I replace your files?
Cheers from Australia
Andrea

On 22/04/2014 7:06 PM, Jim Hunt wrote:

Hi All,

 

OK, as promised, here is how I took the great work Laz had done and tweaked
it to get Rockbox to speak shortcut menu items.

 

First, I did promise you a patch.  If you don't wish to read through the
explanation of how I did this (as I get a bit technical), go here and
download the zip file:

https://www.firedrive.com/file/770C72B99654B003

Unzip the file to your computer, and copy the .rockbox folder inside, as-is,
to the root of your player.  Important Note: the .rockbox folder in the zip
file I'm sharing with you does not contain a complete replacement of the
Rockbox firmware; it is just a ..rockbox folder with files and a
subdirectory that would be added/merged to your player's current .rockbox
folder.  It's probably a good idea to make a backup of your player's.rockbox
folder before merging the contents of my patch to the root of your player.
Next time you boot up your player and go to shortcuts, not only will you be
able to hear the time and date, but you'll also notice several other nice
little surprises.

 

Laz, feel free to include the contents of the zip file in your firmware
packages if you'd like.

 

OK, here's what I did.the technical explanation:

 

First, I took a look at the files in the zip file Laz had created.  In it,
in the .rockbox folder, there's a file called shortcuts.txt.  It was this
file I tweaked, and I also created a subdirectory in my player's .rockbox
directory called shortcuttalk.  (That's "shortcut talk" all run together.
More on this subdirectory and how it is used a bit later.)

 

After doing some research of my own on the Rockbox website, I found an
interesting querk in Rockbox: in order to have shortcut menu items spoken,
the shortcuts.txt file not only needs to include the names of.talk files,
but the names of those .talk files should be preceded by their relative
path.  This is where the shortcuttalk subdirectory I created comes in.  This
subdirectory contains the .talk files the shortcut menu items will use.  So,
here is what the new shortcuts.txt file will look like:

 

[shortcut]

type: time

data: talk

name: time

talkclip: /.rockbox/shortcuttalk/time.talk

 

[shortcut]

type: time

data: sleep 30

name: sleep30

talkclip: /.rockbox/shortcuttalk/sleep30.talk

 

[shortcut]

type: time

data: sleep 60

name: sleep60

talkclip: /.rockbox/shortcuttalk/sleep60.talk

 

[shortcut]

type: time

data: sleep 120

name: sleep120

talkclip: /.rockbox/shortcuttalk/sleep120.talk

 

If you read all that, you might have figured out what the little surprises
are.  OK I'll tell you, you can set the sleep timer from the shortcuts menu
as well, and those items also speak.

 

OK, the shortcuts.txt file is tweaked.  Next, I created the .talk files the
shortcuts menu will use.  For this, I used several things:

1)      The Microsoft Text-to-Speech Server Platform with the Zera Pro
voice;

2)      The free Balabolka program that converts Zera's prompts to wave
files; Balabolka can be downloaded from
http://www.cross-plus-a.com/balabolka.htm;

3)      A copy of the Rockbox Speex encoder executable that comes packaged
with the Rockbox Utility; the encoder executable file is called
rbspeexenc.exe.  I use this file via the command line to convert the wave
files created by Balabolka to .talk files.

Next, I moved the .talk files I created to the shortcuttalk subdirectory in
the .rockbox folder.

 

And that, my friends, is how I got shortcut menu items to speak.

 

Here's the link again for the patch.

https://www.firedrive.com/file/770C72B99654B003

 

Enjoy.

 

Jim

 

 


  _____  


 <http://www.avast.com/> 

This email is free from viruses and malware because avast! Antivirus
<http://www.avast.com/>  protection is active. 

 

 

-- 
Though no one can go back and make a brand new start, anyone can start from
now and make a brand new ending." - Carl Brad



---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

Other related posts:

  • » [tmp] Creating Shortcut Prompts - was RE: How I Got Rockbox to Speak Shortcut Menu Items - Jim Hunt