FS#13156 - Creating of talk files fails ungracefuly when encounting unspeakable text.

Attached to Project: Rockbox
Opened by fennec (fennectech) - Friday, 04 May 2018, 01:28 GMT
Task Type Bugs
Category Rbutil
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Critical
Priority Normal
Reported Version Release 3.14
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No


Rockboxutility barfs while creating talk files if it encounters unpronouncable charicters (japanese kanji) and does not continue afterwords resulting in talk files not being copied to the player.

[talkgenerator.cpp:156 INFO] voicing: "シマシマ" to "/tmp/talkfiles/952b0e2854336082e41fb0ef8ef8dc97.wav"
[ttsfestival.cpp:188 INFO] Voicing "シマシマ" -> "/tmp/talkfiles/952b0e2854336082e41fb0ef8ef8dc97.wav"
[rbsettings.cpp:162 INFO] GET U: "festival-client/path" "/usr/bin/festival_client"
[ttsfestival.cpp:194 INFO] Client cmd: "/usr/bin/festival_client --server localhost --otype riff --ttw --withlisp --output \"/tmp/talkfiles/952b0e2854336082e41fb0ef8ef8dc97.wav\" --prolog \"/tmp/RockboxUtility.zowYwG\" - "
[:0 WARNING] QProcess: Destroyed while process ("/usr/bin/festival_client") is still running.

The result of this is an invalid wav file wich the the encoder bails out on and the process aborts.

[talkgenerator.cpp:235 INFO] encoding "/tmp/talkfiles/952b0e2854336082e41fb0ef8ef8dc97.wav" to "/tmp/talkfiles/"
[encoderrbspeex.cpp:82 INFO] Encoding "/tmp/talkfiles/952b0e2854336082e41fb0ef8ef8dc97.wav" to "/tmp/talkfiles/"
[encoderrbspeex.cpp:103 ERROR] Error: invalid WAV file
[ttsfestival.cpp:29 INFO] Destroying instance

I suggest ignoring failed encoded files and continuing encoding and copying the files that suceeded.
This task depends upon

Comment by fennec (fennectech) - Friday, 04 May 2018, 02:08 GMT
Looks like changing if(m_talkList[i].encoded on line 245 in file /rockbox/rbutil/rbutilqt/base/talkfile.cpp to true will fix the problem.