diff options
| author | hallgren <hallgren@chalmers.se> | 2016-06-06 10:46:13 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2016-06-06 10:46:13 +0000 |
| commit | 5b491b7312f085165dedc9149b9d15699e2abee1 (patch) | |
| tree | f9e0fa527b280b1466754d89015a21d4105c9460 /src | |
| parent | e755c013f8ad6e5b2f79c6ebb3e8748a981d7cd5 (diff) | |
Minibar: remove spaces for better Thai speech synthesis
Diffstat (limited to 'src')
| -rw-r--r-- | src/www/minibar/minibar_support.js | 4 |
1 files changed, 3 insertions, 1 deletions
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() { |
