%T#13977 Task opened by lenzone10: Rockbox Utility: fix SAPI5 TTS test output and playback (Attachment added)

Rockbox via rockbox-sf <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.sourceforge
Message-ID <[email protected]>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Alessio Lenzi (lenzone10) 

Attached to Project - Rockbox
Summary - Rockbox Utility: fix SAPI5 TTS test output and playback
Task Type - Patches
Category - Rockbox Utility (rbutil)
Status - Unconfirmed
Assigned To - 
Operating System - All players
Severity - Media
Priority - Molto Bassa
Reported Version - Rbutil git
Due in Version - Undecided
Due Date - Undecided
Details - After the SAPI5 error handling added for FS#13972, the Test TTS button can
fail with SAPI error 5 even though the engine and voice are configured
correctly. The test also destroys its QSoundEffect and temporary file before
asynchronous playback can complete.

The attached configure.cpp.dif fixes both problems without changing the user
interface or adding translatable strings.

Base revision:

49600dd77c

Cause
=====

Config::testTts() used a QTemporaryFile with no .wav extension. TTSSapi::voice()
removes the requested output before synthesis so that a stale file cannot be
mistaken for successful output. SAPI SpFileStream was therefore asked to create
an extensionless output file and returned error 5 (invalid procedure call or
argument).

After successful synthesis, QSoundEffect was allocated on the stack, its loop
count was set to zero, and the temporary file was removed when testTts()
returned. This does not allow asynchronous playback to complete reliably.


Fix
===

The change:

* creates a temporary directory and requests an initially nonexistent
  tts-test.wav inside it;
* keeps the directory and generated wave file alive for playback;
* keeps QSoundEffect alive until playback finishes or fails;
* requests one playback and cleans up all temporary data afterward.


Verification
============

Environment:

* Windows 64 bit
* Qt 6.8.3
* MinGW 13.1.0
* SAPI5
* Vocalizer Expressive Luca Harpo 22 kHz, licensed local voice

Before the change, Test TTS consistently reported:

  5: Invalid procedure call or argument

After the change, two consecutive tests synthesized and played the test phrase
successfully. Full voice-file generation also continued to work.


One or more files have been attached.

More information can be found at the following URL:
https://www.rockbox.org/tracker/task/13977

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
-- 
rockbox-sf mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.