|
|
|
@ -40,8 +40,9 @@ This file is part of the PIXHAWK project
@@ -40,8 +40,9 @@ This file is part of the PIXHAWK project
|
|
|
|
|
#include <ApplicationServices/ApplicationServices.h> |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_WINDOWS |
|
|
|
|
#include <windows.h> |
|
|
|
|
// Speech synthesis is only supported with MSVC compiler
|
|
|
|
|
#if _MSC_VER |
|
|
|
|
#include <sapi.h> |
|
|
|
|
using System; |
|
|
|
|
using System.Speech.Synthesis; |
|
|
|
|
#endif |
|
|
|
@ -117,7 +118,8 @@ bool GAudioOutput::say(QString text, int severity)
@@ -117,7 +118,8 @@ bool GAudioOutput::say(QString text, int severity)
|
|
|
|
|
if (!emergency) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_WINDOWS |
|
|
|
|
// Speech synthesis is only supported with MSVC compiler
|
|
|
|
|
#if _MSC_VER |
|
|
|
|
SpeechSynthesizer synth = new SpeechSynthesizer(); |
|
|
|
|
synth.SelectVoice("Microsoft Anna"); |
|
|
|
|
synth.SpeakText("Hello, world!"); |
|
|
|
|