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 error in Qt 6.9.1
Forum Updated to NodeBB v4.3 + New Features

QTextToSpeech error in Qt 6.9.1

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 142 Views 1 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.
  • Lab7L Offline
    Lab7L Offline
    Lab7
    wrote last edited by
    #1

    Hi

    I experience a problem when changing from Qt 6.9.0 to 6.9.1

    I'm using QTextToSpeech class and it worked before changing to 6.9.1. Using Qt Creator 17.0.0 and Windows 11 (on Android it doesn't produce the same error)

    It compiles for both versions without errors, but it fails running when calling say(). Application Output shows

    QAudioSink::start: QAudioFormat not supported by QAudioDevice

    I wrote a simple demo to illustrate the problem. It works in 6.9.0, but fails for 6.9.1

    #include <QCoreApplication>
    #include <QDebug>
    #include <QTimer>
    #include <QtTextToSpeech>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        QTextToSpeech   tts;
        tts.say("Hello world! Anyone? Is there anyone out there?");
    
        QTimer::singleShot(10000, &a, &QCoreApplication::quit);
    
        return a.exec();
    }
    
    

    Any idea on how to fix this? Or is it a bug in Qt 6.9.1?

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

      Hi and welcome to devnet,

      That sounds like a regression.

      One thing you can check is the default format used in 6.9.0 and compare it with 6.9.1.

      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
      0
      • Lab7L Offline
        Lab7L Offline
        Lab7
        wrote last edited by Lab7
        #3

        my post gets marked as spam from Akismet com ...

        SGaistS 1 Reply Last reply
        0
        • Lab7L Lab7

          my post gets marked as spam from Akismet com ...

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          @Lab7 That can happen from time to time. What were you trying to post ?

          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
          0
          • Lab7L Offline
            Lab7L Offline
            Lab7
            wrote last edited by
            #5

            Thank you for answer

            I can retrieve the preferred format and it's the same running both 6.9.0 and 6.9.1:
            Prefered format : QAudioFormat( 48000 Hz, 2 Channels, Float Format )

            I suspect that a valid format is not set by default in 6.9.1. But I can't figure out how to change the format of the default output QAudioDevice. What am I missing?

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

              Which engine are you using for the TTS part ?

              I just realized I forgot that the QtMultimedia module rewrite changed a lot of things so my original idea might not be that good of an idea.

              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
              0
              • Lab7L Offline
                Lab7L Offline
                Lab7
                wrote last edited by
                #7

                I didn't expect this (but admit that I should have checked it earlier...)

                Using 6.9.0: When selecting "winrt" as engine it output the format error, but using "sapi" it works.

                Using "winrt" the Application Output shows "QAudioSink::start: QAudioFormat not supported by QAudioDevice"

                Still don't know how to fix the problem for winrt, but it's a step forward. Also, the application needs to work for alle engines the end user select in order to support all locales and voices.

                It would be interesting to know if this only applies to my setup or if anyone else using Windows 11 and Qt 6.9.1 experience the same issue with this code

                I still can't figure out how to set the format of the default output

                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