diff options
author | Patrick Höhn <hoehnp@users.noreply.github.com> | 2018-10-07 10:18:30 +0200 |
---|---|---|
committer | jkoan <jkoan@users.noreply.github.com> | 2018-10-07 11:18:30 +0300 |
commit | c0621141fa18dbe48fdf1325e5bc9c00278041cf (patch) | |
tree | 2b7045d1e337166d258de6460b8c4dc7c47b6e8a | |
parent | 6389ce56cb6681695734d02b7223ad35b69241e2 (diff) | |
download | navit-c0621141fa18dbe48fdf1325e5bc9c00278041cf.tar.gz |
Change:win32:Replace espeak with internal windows tts(#681)
* Update circle.yml
* Refactor: first attempt to run win32 with native tts system
ändrad: CMakeLists.txt
ny fil: navit/xslt/speech_win32.xslt
ändrad: navit/xslt/windows.xslt
-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> |