From 5b491b7312f085165dedc9149b9d15699e2abee1 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 6 Jun 2016 10:46:13 +0000 Subject: [PATCH] Minibar: remove spaces for better Thai speech synthesis --- src/www/minibar/minibar_support.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/www/minibar/minibar_support.js b/src/www/minibar/minibar_support.js index 46da3d846..749f10d3c 100644 --- a/src/www/minibar/minibar_support.js +++ b/src/www/minibar/minibar_support.js @@ -85,7 +85,9 @@ function speech_buttons(to3,to2,txt) { var pick=pick2dash } function btn(v) { - var u=new SpeechSynthesisUtterance(txt) + // Remove spaces more fluent Thai: + var txt2 = v.lang=="th-TH" ? txt.split(" ").join("") : txt + var u=new SpeechSynthesisUtterance(txt2) u.lang=v.lang // how to use v.voiceURI or v.name? function speak() {