0
音声合成APIがサポートする言語のリストは誰でもありますか?または、異なる言語を見つけるために実行できるコードのスニペットですか?ありがとう!音声合成APIサポートされている言語
音声合成APIがサポートする言語のリストは誰でもありますか?または、異なる言語を見つけるために実行できるコードのスニペットですか?ありがとう!音声合成APIサポートされている言語
サポートされている音声のリストは、ブラウザ/ OSの組み合わせごとに異なります。
https://jsbin.com/ginanegoqu/edit?js,output
if ('speechSynthesis' in window) {
// Start an html table for languages details
var text = '<table border=1><tr><th>Default<th>Language<th>Local<th>Name<th>URI</tr>';
// Get voices; add to table markup
function loadVoices() {
var voices = speechSynthesis.getVoices();
voices.forEach(function(voice, i) {
// Add all details to table
text += '<tr><td>' + voice.default + '<td>'
+ voice.lang + '<td>' + voice.localService
+ '<td>' + voice.name + '<td>' + voice.voiceURI;
});
}
loadVoices();
langList.innerHTML = text;
// Chrome loads voices asynchronously.
window.speechSynthesis.onvoiceschanged = function(e) {
loadVoices();
langList.innerHTML = text;
}
}
: 私はそれを実行していますどのブラウザ/ OSの声を示すjsbinを書きました