Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTextToSpeech plugin threading question

QTextToSpeech plugin threading question

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 838 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    X-Krys
    wrote on last edited by
    #1

    Hi all,

    I'm writting a plugin for QTextToSpeech to use another speech engine than the ones available now.

    This engine syncronously generates speech audio samples that I need to pass to a QAudioOutput to play it.

    I will use the QTextToSpeech api from a Qml UI.

    I' wondering if and where I should you threads:

    1/ Do I need to put my engine in a dedicated thread ?
    2/ Do I need to put the QAudioOutput in a dedicated thread ?

    Thanks in advance for your feedback on this.

    Cheers

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Does that task takes time/resources ? If so, then I would move the engine handling in its own thread. Doing so, you'll likely have the QAudioOuput in the same thread as the engine.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • X Offline
        X Offline
        X-Krys
        wrote on last edited by
        #3

        thx @SGaist, it takes in best case 20-25ms for a small sentence, but can be much more for big ones

        1 Reply Last reply
        0
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @X-Krys have you checked the source code for the QTextToSpeech plugins? In particular, QTextToSpeechProcessor which:

          // A common base class for text-to-speech engine integrations
          // that require audio output implementation and thread handling.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          X 1 Reply Last reply
          1
          • Pablo J. RoginaP Pablo J. Rogina

            @X-Krys have you checked the source code for the QTextToSpeech plugins? In particular, QTextToSpeechProcessor which:

            // A common base class for text-to-speech engine integrations
            // that require audio output implementation and thread handling.

            X Offline
            X Offline
            X-Krys
            wrote on last edited by
            #5

            @Pablo-J.-Rogina Oh I totally missed it! I looked at some plugins but not flite implementation that use it, gonna have a look! thanks!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved