diff options
Diffstat (limited to 'files/ja/web/api/web_speech_api')
-rw-r--r-- | files/ja/web/api/web_speech_api/index.html | 4 | ||||
-rw-r--r-- | files/ja/web/api/web_speech_api/using_the_web_speech_api/index.html | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/files/ja/web/api/web_speech_api/index.html b/files/ja/web/api/web_speech_api/index.html index ae5f461b82..ab17eadc21 100644 --- a/files/ja/web/api/web_speech_api/index.html +++ b/files/ja/web/api/web_speech_api/index.html @@ -27,7 +27,7 @@ translation_of: Web/API/Web_Speech_API <li>音声合成は、{{domxref("SpeechSynthesis")}} インターフェイス経由でアクセスされます。これは、プログラムに、そのテキストコンテンツを読み上げる機能を提供します (通常はデバイスのデフォルトの音声合成を経由)。異なる音声の種類は、{{domxref("SpeechSynthesisVoice")}} オブジェクトで表され、発話してほしいテキストの異なる部分は、{{domxref("SpeechSynthesisUtterance")}} オブジェクトで表されます。これらを {{domxref("SpeechSynthesis.speak()")}} メソッドに渡すことによって発話されます。</li> </ul> -<p>これらの機能の使い方についての詳細は、<a href="/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API">Using the Web Speech API</a> を参照してください。</p> +<p>これらの機能の使い方についての詳細は、<a href="/ja/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API">Using the Web Speech API</a> を参照してください。</p> <h2 id="Web_Speech_API_Interfaces" name="Web_Speech_API_Interfaces">Web Speech API インターフェイス</h2> @@ -109,7 +109,7 @@ translation_of: Web/API/Web_Speech_API <h2 id="See_also" name="See_also">関連項目</h2> <ul> - <li><a href="/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API">Using the Web Speech API</a></li> + <li><a href="/ja/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API">Using the Web Speech API</a></li> <li><a href="http://www.sitepoint.com/talking-web-pages-and-the-speech-synthesis-api/">SitePoint の記事</a></li> <li><a href="http://updates.html5rocks.com/2014/01/Web-apps-that-talk---Introduction-to-the-Speech-Synthesis-API">HTML5Rocks の記事</a></li> <li><a href="http://aurelio.audero.it/demo/speech-synthesis-api-demo.html">デモ</a> [aurelio.audero.it]</li> diff --git a/files/ja/web/api/web_speech_api/using_the_web_speech_api/index.html b/files/ja/web/api/web_speech_api/using_the_web_speech_api/index.html index 3937d15679..84fd68ff73 100644 --- a/files/ja/web/api/web_speech_api/using_the_web_speech_api/index.html +++ b/files/ja/web/api/web_speech_api/using_the_web_speech_api/index.html @@ -115,7 +115,7 @@ document.body.onclick = function() { <h4 id="結果の受け取りとハンドリング">結果の受け取りとハンドリング</h4> -<p>音声認識が開始されると、結果やその他の周辺情報を取得するために使用できる多くのイベントハンドラがあります(<a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#Event_handlers"><code>SpeechRecognition</code> のイベントハンドラのリスト</a> を参照してください)。最も一般的なものは {{domxref("SpeechRecognition.onresult")}} で、成功した結果を受信したときに発火されます。</p> +<p>音声認識が開始されると、結果やその他の周辺情報を取得するために使用できる多くのイベントハンドラがあります(<a href="/ja/docs/Web/API/SpeechRecognition#Event_handlers"><code>SpeechRecognition</code> のイベントハンドラのリスト</a> を参照してください)。最も一般的なものは {{domxref("SpeechRecognition.onresult")}} で、成功した結果を受信したときに発火されます。</p> <pre class="brush: js notranslate">recognition.onresult = function(event) { var color = event.results[0][0].transcript; @@ -255,7 +255,7 @@ if (speechSynthesis.onvoiceschanged !== undefined) { <h4 id="Speaking_the_entered_text">Speaking the entered text</h4> -<p>Next, we create an event handler to start speaking the text entered into the text field. We are using an <a href="/en-US/docs/Web/API/GlobalEventHandlers/onsubmit">onsubmit</a> handler on the form so that the action happens when <kbd>Enter</kbd>/<kbd>Return</kbd> is pressed. We first create a new {{domxref("SpeechSynthesisUtterance.SpeechSynthesisUtterance()", "SpeechSynthesisUtterance()")}} instance using its constructor — this is passed the text input's value as a parameter.</p> +<p>Next, we create an event handler to start speaking the text entered into the text field. We are using an <a href="/ja/docs/Web/API/GlobalEventHandlers/onsubmit">onsubmit</a> handler on the form so that the action happens when <kbd>Enter</kbd>/<kbd>Return</kbd> is pressed. We first create a new {{domxref("SpeechSynthesisUtterance.SpeechSynthesisUtterance()", "SpeechSynthesisUtterance()")}} instance using its constructor — this is passed the text input's value as a parameter.</p> <p>Next, we need to figure out which voice to use. We use the {{domxref("HTMLSelectElement")}} <code>selectedOptions</code> property to return the currently selected {{htmlelement("option")}} element. We then use this element's <code>data-name</code> attribute, finding the {{domxref("SpeechSynthesisVoice")}} object whose name matches this attribute's value. We set the matching voice object to be the value of the {{domxref("SpeechSynthesisUtterance.voice")}} property.</p> @@ -283,7 +283,7 @@ if (speechSynthesis.onvoiceschanged !== undefined) { event.utterance.text + '", which is "' + char + '".'); }</pre> -<p>Finally, we call <a href="/en-US/docs/Web/API/HTMLElement/blur">blur()</a> on the text input. This is mainly to hide the keyboard on Firefox OS.</p> +<p>Finally, we call <a href="/ja/docs/Web/API/HTMLElement/blur">blur()</a> on the text input. This is mainly to hide the keyboard on Firefox OS.</p> <pre class="brush: js notranslate"> inputTxt.blur(); }</pre> |