Rockbox Development > Feature Ideas

Talk File Generation

(1/1)

trumpton:
I've successfully installed Rockbox on a Sansa Clip V1, and have found it to be quite stable, however, I've found a few enhancements that I'd find useful, and perhaps others might too ...


TALK FILE OVERWRITING:

My computer crashed (not Rockbox) during the .talk generation - it left a whole bunch of .talk files which were 0 in length - it would be great if the .talk file generation could spot and re-generate these, even though the 'Create only New Talk Files' is selected.



TALK FILENAME GENERATION:

I have my whole music archive organised with filenames using Camel Case, rather than containing spaces.  When I generate the .talk files, some of them are quite garbled.

Could the .talk file creation be modified to recognise CamelCase, or even better, extract information from the ID3 tags within the file?

A typical file structure is shown below:

Pop-Rock/
  DireStraits-BrothersInArms/
    01_SoFarAway.mp3

etc ...

I've written stuff for ID3 field manipulation, and it's quite easy with the ID3 library - I've extracted bits of code from the attached program to show how easy it is ...

#include <id3/tag.h>
char *GetTitle(char *filename) {

  static char title[1024] ;
  ID3_Tag *tag ;
  ID3_Frame *src ;
  ID3_Field *p ;

  // Get Tag, Try ID3V2 first
  tag=new ID3_Tag ;
  tag->Link(filename, ID3TT_ID3V2) ;
  if (tag->Find(ID3FID_TITLE)==NULL) tag->Link(filename) ;

  // Get Text from Title Field and Return it
  src=tag->Find(ID3FID_TITLE) ;
  if (src==NULL) return "" ;
  p=src->GetField(ID3FN_TEXT) ;
  if (p==NULL) return "" ;
  p->Get(title, 1023) ;
  return title ;
}


TALK FILE USE IN DATABASE MENU:

Not sure why, but the talk files only seem to work in the Files menu, and not under the database menu - is this peculiar to the Sansa Clip, or am I doing something wrong?



Many thanks, and Keep up the great work !

funman:

--- Quote from: trumpton on September 01, 2010, 01:21:55 PM ---Not sure why, but the talk files only seem to work in the Files menu, and not under the database menu - is this peculiar to the Sansa Clip, or am I doing something wrong?

--- End quote ---

Did you install at least r27962?

Voice wasn't supposed to work on the clipv1 before this revision

Domonoky:
Unfortunatly the current Talkfile system doesnt work with the database. It has two problems, first it would need many many pregenerated talkfiles for all the metadata and second it would have to combine clips to speak what the database shows in the various views so making that possible is a complicated task which noone has done till now, maybe you could change that ? :-)

About improving the talkfile generation in Rockbox Utility: Both things shouldnt be to hard, but needs someone todo it, we would be happy to recieve patches from you.   :-)

trumpton:
Thanks for your replies.

I'm using version r27996-100904

I've managed to patch rockbox utility to correctly process CamelCase files and directories, and the output is very much improved.

I've submitted the patch in via the patches tracker.

I didn't do anything with the ID3 parsing, as I'm not yet familiar enough with rockbox and different input file formats - I suspect it handles files other than MP3, and MP3 is all I know!

Likewise, I'm new to QT, and haven't got my head around the zero length file issue ... yet.

Best Regards, Steve

bluebrother:

--- Quote from: Domonoky on September 01, 2010, 04:05:08 PM ---About improving the talkfile generation in Rockbox Utility: Both things shouldnt be to hard, but needs someone todo it, we would be happy to recieve patches from you.   :-)

--- End quote ---

I had the idea of allowing the user to provide a list of regular expression substitutions to get applied before voicing file names. The reason for this is simple: Using the files tags for speaking is a bad idea since voicing voices the filename, and that filename not necessarily needs to match the filename in any way. Second, adjusting the filenames is a special case (from my point of view) and likely to be completely different for each user. In your case you could simply replace every capital letter with itself and a space prepended to get the desired result. This could also be used to do word replacements to support the TTS engines when speaking (the voice files generated by the build system does have such a word list, Rockbox Utility doesn't have support for this at all).

In any case using file metadata doesn't sound like a good way to handle the problem to me. See also my comment to FS#11622.

Navigation

[0] Message Index

Go to full version