Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102355

Qt speech utterance completion signal

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • 6.6.0 FF
    • None
    • Speech
    • None
    • 0ff6f9996 (dev)

    Description

      The problem

      Currently the say() function does not return a value and is asynchronous, meaning it is not possible to reliably track utterance completion. The current speech is stopped if currently active when say() is called. However, the API has not been designed in such way that the state transitions guaranteed the same pattern (Ready -> say() -> Speaking -> say() -> ?). This makes utterance completion tracking difficult and unreliable at application level. This can be implemented in the application to some extent, but fallback measures such as watchdog timer (for tracking state transitions) are necessary to ensure reliability.

      The solution

      Add queue() function and a completion signal for the utterance.

      int queue(const QString &text);
      
      Q_SIGNALS:
      void utteranceCompleted(int utteranceId);
      

      The new queue() function would not stop the current speech, but would add the text to internal queue and dispatch it to the engine when the engine state becomes Ready. In case of errorneous state, the function would return 0 indicating an error. A positive integer would be allocated as utterance id which the application can store. The utterance completion would be signaled by utteranceCompleted(int) function. Only successful completion is signaled.

      In case of say() and queue() calls are mixed:

      • say() stops the current speech and clears the queue, no utterance completion signal is sent as the utterances were not finished.
      • queue() waits until the current speech is finished, no completion signal for the utterance started by say().

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vhilshei Volker Hilsheimer
            jakoivik Jarkko Koivikko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes