Chrome 46에서 XML은 언어가 en
으로 설정된 경우 Windows에서 XML 문서로 올바르게 해석됩니다. 그러나 태그가 실제로 어떤 작업을 수행하고 있다는 증거는 없습니다.
var msg = new SpeechSynthesisUtterance();
msg.text = '<?xml version="1.0"?>\r\n<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><emphasis>Welcome</emphasis> to the Bird Seed Emporium. Welcome to the Bird Seed Emporium.</speak>';
msg.lang = 'en';
speechSynthesis.speak(msg);
<phoneme>
태그도 완전히 무시, IPA가 실패 할 말을 내 시도했다 :이 SSML의 <emphasis>
및 비 <emphasis>
버전 간의 차이를 듣지 않았다.
var msg = new SpeechSynthesisUtterance();
msg.text='<?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US"> Pavlova is a meringue-based dessert named after the Russian ballerina Anna Pavlova. It is a meringue cake with a crisp crust and soft, light inside, usually topped with fruit and, optionally, whipped cream. The name is pronounced <phoneme alphabet="ipa" ph="pævˈloʊvə">...</phoneme> or <phoneme alphabet="ipa" ph="pɑːvˈloʊvə">...</phoneme>, unlike the name of the dancer, which was <phoneme alphabet="ipa" ph="ˈpɑːvləvə">...</phoneme> </speak>';
msg.lang = 'en';
speechSynthesis.speak(msg);
이는 Microsoft 음성 API 가 제대로 SSML을 처리 않는다는 사실에도 불구하고.
var str = "Pavlova is a meringue-based dessert named after the Russian ballerina Anna Pavlova. It is a meringue cake with a crisp crust and soft, light inside, usually topped with fruit and, optionally, whipped cream. The name is pronounced /pævˈloʊvə/ or /pɑːvˈloʊvə/, unlike the name of the dancer, which was /ˈpɑːvləvə/.";
var regex = new Regex("/([^/]+)/");
if (regex.IsMatch(str))
{
str = regex.Replace(str, "<phoneme alphabet=\"ipa\" ph=\"$1\">word</phoneme>");
str.Dump();
}
SpeechSynthesizer synth = new SpeechSynthesizer();
PromptBuilder pb = new PromptBuilder();
pb.AppendSsmlMarkup(str);
synth.Speak(pb);
혹시이 문제를 해결 했 : 다음은 C#을 조각은 LinqPad에서 사용하기에 적합하다? SSML과 크롬에서 가장 가까운 것은 크롬 플러그인 음성 합성을위한 문서입니다. https://developer.chrome.com/extensions/tts – ElDog
또한 Linux를 사용하고 있습니다. 거기에 문제가있을 수 있으므로 https://code.google.com/p/chromium/issues/detail?id=88072 – ElDog
@ElDog 내가 발견 한 모든 버그는 (나는 거기에 주석을 달았습니다) - 방법은 btw Mac/Win에서도 구현되지 않은 설명을 읽었습니다. –