Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Rbutil
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Rbutil git
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Delyan Kratunov - 2010-03-31
Last edited by Dominik Wenger - 2010-06-04

FS#11160 - Rbutil: Make TTS and encoders run on all cores

Patch 1 makes rbutil run the encoding process in parallel, on all cores. Tested with rbspeex, should work just as well with LAME.

Patch 2 makes rbutil run the Festival and TTSExes engines on all cores (Carbon needs reworking, SAPI doesn’t look thread-safe - needs testing). The patch also introduces a very basic framework for the TTS engines to report their capabilities. Tested with Festival and espeak.

Naturally, there may be bugs but I think this is more or less the final solution to the problem (aside from cosmetic changes such as moving the extra members of TalkEntry to a new substructure).

Patch 2 cannot be applied without patch 1.

Closed by  Dominik Wenger
2010-06-04 21:24
Reason for closing:  Accepted
Additional comments about closing:  

Just commited it.

Delyan Kratunov commented on 2010-03-31 23:45

Sorry, wrong file. Attached is the correct patch 1.

Delyan Kratunov commented on 2010-04-05 18:48

Some cosmetic fixes. This is the final patch, really. I can’t think of any more functionality to add, so… I rest my case :)

Delyan Kratunov commented on 2010-04-06 19:45

This version fixes some tabs and a bug with duplicated entries. I also spotted a bug where refs.generator was not set for the voicing process, so the whole app would have crashed if the voicing failed.

Dominik Wenger commented on 2010-04-21 22:08

This version fixes the following problems:
- No progress Info with ttssapi. (changed waitForReadyRead to a polling loop in ttssapi::voice() )
- TTS Abort didnt work with ttssapi. (removed the waitForFinished() in Talkgenerator::abort() )

Also i think this patch needs testing with the other non-parallel TTS (TTSCarbon) before it can go in.

Delyan Kratunov commented on 2010-04-25 00:09

Dominik, thanks for testing. I’ll be setting up a VM soon to investigate SAPI further.

I have one objection to your changes, though. The second point in your comment must surely be a bug in ttssapi? After, all, all QFutureWatcher::cancel does is to signal the QFuture to stop sending new data to the child thread (meaning, wait for the current thread to finish and stop). waitForFinished() simply makes the call synchronous, so the problem lies deeper - perhaps something is keeping the child thread alive? Did you try breaking at TalkGenerator::abort in a debugger?

Dominik Wenger commented on 2010-04-25 21:39

I didnt try it in the debugger, but the waitForFinished call blocked the whole UI, so generation either gets executed in the main-thread or there is some other threading/signaling problem.

The function which startes the generation waits for != running,so i thought it should be safe to remove.

Dominik Riebeling commented on 2010-05-02 20:56

Fixed building on OS X. The changes to encoders.cpp are purely related to qDebug() output, so IMO those changes can go in immediately as separate commit.

I’ve tried building a voice file with the patch (05) and couldn’t find any issues so far (the voice file seems to work fine, at least for the rather small amount of menu entries I’ve checked). Haven’t looked in the code yet.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing