Tình hình là mình có kiếm đc 1 widget dùng cho việc đọc văn bản tiếng Việt. Khi add vào forum thì nó bị lỗi khung chọn jọng đọc (voiceselection).
Nhờ các bác chỉnh lại jup với. Chân thành cảm ơn!
Nguồn: http://responsivevoice.org/text-to-speech-sdk/text-to-speech-widget/
Nhờ các bác chỉnh lại jup với. Chân thành cảm ơn!
- Code:
<script src="https://code.responsivevoice.org/responsivevoice.js"></script>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<textarea id="text" cols="45" rows="3">Hello world</textarea>
<select id="voiceselection"></select>
<input
onclick="responsiveVoice.speak($('#text').val(),$('#voiceselection').val());"
type="button"
value="Play"
/>
<script>
//Populate voice selection dropdown
var voicelist = responsiveVoice.getVoices();
var vselect = $("#voiceselection");
$.each(voicelist, function() {
vselect.append($("<option />").val(this.name).text(this.name));
});
</script>
Nguồn: http://responsivevoice.org/text-to-speech-sdk/text-to-speech-widget/