[tmp] How I Got Rockbox to Speak Shortcut Menu Items

  • From: "Jim Hunt" <jhunt76@xxxxxxx>
  • To: <tmp@xxxxxxxxxxxxx>
  • Date: Tue, 22 Apr 2014 05:06:32 -0400

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

 



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

Other related posts: