Tags:
Forums: 

สวัสดีครับ ปกติ ผมใช้ function text to speech ใน app ที่ผมทำ ใน iOS เขาจะ support ทุกภาษามาจาก OS เลย

ไม่ทราบว่า ใน Android มีวิธีใช้ text to speech สำหรับภาษาไทยไหมครับ
ผมหา third party library มา มัน support แต่ภาษาอังกฤษครับ

ขอบคุณครับ

Get latest news from Blognone
By: neonicus
Android
on 19 February 2015 - 09:36 #792509

พวก app เห็นมี Vaja กับ Nounce นะที่เป็นไทย
เสียเงินทั้งคู่Vajaคุ้นๆว่าพัฒนาโดย nectec แต่ก็ดันขาย ไม่ได้ให้โหลดฟรี

By: Aorjor on 23 February 2015 - 22:24 #793853

ลองใช้ Webview รัน Javascript ดูครับ
ลองดูใน Chrome ก่อนก็ได้ ใช้คำสั่ง
var msg = new SpeechSynthesisUtterance();
msg.volume = 1; // 0 to 1
msg.rate = 0.9; // 0.1 to 10
msg.pitch = 1.4; //0 to 2
msg.text = 'ภาษาไทยนะจ๊ะจุ๊บๆ';
msg.lang = 'th-Th';

msg.onend = function(e) {
console.log('Finished in ' + event.elapsedTime + ' seconds.');
};

speechSynthesis.speak(msg);

ref : http://updates.html5rocks.com/2014/01/Web-apps-that-talk---Introduction-to-the-Speech-Synthesis-API