diff options
-rwxr-xr-x | CMakeLists.txt | 1 | ||||
-rw-r--r-- | navit/xslt/speech_win32.xslt | 6 | ||||
-rw-r--r-- | navit/xslt/windows.xslt | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 896a52ae6..105766811 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -637,6 +637,7 @@ if (WIN32 AND NOT WINCE) set(HAVE_API_WIN32 1) set(HAVE_STDINT_H 1) list(APPEND NAVIT_LIBS winmm) + set_with_reason(speech/cmdline "using native tts system of windows instead of espeak" TRUE) endif() if(WINCE) add_plugin(support/libc "wince detected" TRUE) diff --git a/navit/xslt/speech_win32.xslt b/navit/xslt/speech_win32.xslt new file mode 100644 index 000000000..12459fbf7 --- /dev/null +++ b/navit/xslt/speech_win32.xslt @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude"> + <xsl:template match="/config/navit/speech"> + <speech type="cmdline" data="PowerShell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak(%s);""/> + </xsl:template> +</xsl:transform> diff --git a/navit/xslt/windows.xslt b/navit/xslt/windows.xslt index 989566c83..862d82ba5 100644 --- a/navit/xslt/windows.xslt +++ b/navit/xslt/windows.xslt @@ -3,7 +3,7 @@ <xsl:output method="xml" doctype-system="navit.dtd" cdata-section-elements="gui"/> <xsl:include href="samplemap.xslt"/> <xsl:include href="osd_enable_zoom.xslt"/> - <xsl:include href="speech_espeak.xslt"/> + <xsl:include href="speech_win32.xslt"/> <xsl:template match="/config/navit/graphics"> <graphics type="win32" /> </xsl:template> |