History

Some experimentation yields promising results...

Zach Fox committed 8 years ago

Commit 26e388b1 parent 79f30eb5 files · +769 −736Browse files

Showing the changes to interface/src/scripting/TTSScriptingInterface.h (1 of 5 files). Show all

Unified · Split

interface/src/scripting/TTSScriptingInterface.h+9−2
@@ -19,6 +19,7 @@ · 18 unmodified lines
19#include <sapi.h> // SAPI19#include <sapi.h> // SAPI
20#include <sphelper.h> // SAPI Helper20#include <sphelper.h> // SAPI Helper
21#include <AudioInjector.h>21#include <AudioInjector.h>
22#include <AudioConstants.h>
22 23
23class TTSScriptingInterface : public QObject, public Dependency {24class TTSScriptingInterface : public QObject, public Dependency {
24 Q_OBJECT25 Q_OBJECT
@@ -28,11 +29,17 @@ public: · 3 unmodified lines
28 ~TTSScriptingInterface();29 ~TTSScriptingInterface();
29 30
30 Q_INVOKABLE void testTone(const bool& alsoInject = false);31 Q_INVOKABLE void testTone(const bool& alsoInject = false);
31 Q_INVOKABLE void speakText(const QString& textToSpeak, const bool& alsoInject = false);32 Q_INVOKABLE void speakText(const QString& textToSpeak,
33 const int& newChunkSize = (AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL * 50),
34 const int& timerInterval = 96,
35 const int& sampleRate = 24000,
36 const int& bitsPerSample = 16,
37 const bool& alsoInject = false);
32 Q_INVOKABLE void stopLastSpeech();38 Q_INVOKABLE void stopLastSpeech();
33 39
34signals:40signals:
35 void ttsSampleCreated(QByteArray outputArray);41 void ttsSampleCreated(QByteArray outputArray, const int& newChunkSize, const int& timerInterval);
42 void clearTTSBuffer();
36 43
37private:44private:
38 class CComAutoInit {45 class CComAutoInit {