Web Speech API
Web Speech API를 ì¬ì©íë©´ ìì± ë°ì´í°ë¥¼ ì¹ ì±ì íµí©í ì ììµëë¤. Web Speech APIë ë ë¶ë¶ì¼ë¡ 구ì±ë©ëë¤. SpeechSynthesis (í
ì¤í¸ ìì± ë³í) ë° SpeechRecognition (ë¹ë기 ìì± ì¸ì)ì
ëë¤.
Web Speech APIì ê°ë ê³¼ ì¬ì©ë²
Web Speech API를 ì¬ì©íë©´ ì¹ ì±ìì ìì± ë°ì´í°ë¥¼ ì²ë¦¬í ì ììµëë¤. ì´ APIìë ë ê°ì§ êµ¬ì± ììê° ììµëë¤.
- ìì±ì¸ìì ìì± ì
ë ¥(ì¼ë°ì ì¼ë¡ ì¥ì¹ì 기본 ìì± ì¸ì ìë¹ì¤ë¥¼ íµí´)ìì ìì± ë§¥ë½ì ì¸ìíê³ ì ì íê² ìëµíë 기ë¥ì ì ê³µíë
SpeechRecognitionì¸í°íì´ì¤ë¥¼ íµí´ ì ê·¼í©ëë¤. ì¼ë°ì ì¼ë¡ ì¸í°íì´ì¤ì ìì±ì를 ì¬ì©íì¬ ì¥ì¹ì ë§ì´í¬ë¥¼ íµí´ ìì±ì´ ì ë ¥ë ë, ì´ë¥¼ ê°ì§íë ë° ì¬ì©í ì ìë ì¬ë¬ ì´ë²¤í¸ í¸ë¤ë¬ê° ìë ìSpeechRecognitionê°ì²´ë¥¼ ìì±í©ëë¤.SpeechGrammarì¸í°íì´ì¤ë ì±ì´ ì¸ìí´ì¼ íë í¹ì ë¬¸ë² ì§í©ì ìí 컨í ì´ë를 ëíë ëë¤. 문ë²ì JSpeech ë¬¸ë² íì(JSGF)ì ì¬ì©íì¬ ì ìë©ëë¤. - ìì± í©ì±ì íë¡ê·¸ë¨ì´ (ì¼ë°ì ì¼ë¡ ì¥ì¹ì 기본 ìì± í©ì±ê¸°ë¥¼ íµí´) í
ì¤í¸ ì½í
ì¸ ë¥¼ ì½ì ì ìê² í´ì£¼ë í
ì¤í¸ ìì± ë³í ì»´í¬ëí¸ì¸
SpeechSynthesisì¸í°íì´ì¤ë¥¼ íµí´ ì ê·¼í©ëë¤. ë¤ìí ìì± ì íìSpeechSynthesisVoiceê°ì²´ë¡ ííëê³ , ë§íê³ ì íë í ì¤í¸ì ë¤ë¥¸ ë¶ë¶ìSpeechSynthesisUtteranceê°ì²´ë¡ ííë©ëë¤. ì´ë¬í ê°ì²´ë¥¼SpeechSynthesis.speak()ë©ìëì ì ë¬íì¬ ìì±ì ê°ì ¸ì¬ ì ììµëë¤.
ì´ë¬í ê¸°ë¥ ì¬ì©ì ëí ìì¸í ë´ì©ì Web Speech API ì¬ì©í기 문ì를 참조íì¸ì.
Web Speech API ì¸í°íì´ì¤
>ìì± ì¸ì(Speech recognition)
SpeechRecognition-
ì¸ì ìë¹ì¤ë¥¼ ìí 컨í¸ë¡¤ë¬ ì¸í°íì´ì¤ë¡, ì¸ì ìë¹ì¤ìì ì ì¡ë
SpeechRecognitionEventë ì²ë¦¬í©ëë¤. SpeechRecognitionAlternative-
ìì± ì¸ì ìë¹ì¤ìì ì¸ìí ë¨ì¼ ë¨ì´ë¥¼ ëíë ëë¤.
SpeechRecognitionErrorEvent-
ì¸ì ìë¹ì¤ì ì¤ë¥ ë©ìì§ë¥¼ íìí©ëë¤.
SpeechRecognitionEvent-
resultë°nomatchì´ë²¤í¸ì ëí ì´ë²¤í¸ ê°ì²´ë¡, ì¤ê° ëë ìµì¢ ìì± ì¸ì ê²°ê³¼ì ê´ë ¨ë 모ë ë°ì´í°ë¥¼ í¬í¨í©ëë¤. SpeechGrammar-
ì¸ì ìë¹ì¤ìì ì¸ìí기를 ìíë ë¨ì´ ëë ë¨ì´ í¨í´ì ëë¤.
SpeechGrammarList-
SpeechGrammarê°ì²´ 목ë¡ì ëíë ëë¤. SpeechRecognitionResult-
ë¨ì¼ ì¸ì ì¼ì¹ë¥¼ ëíë´ë©°, ì¬ë¬ ê°ì
SpeechRecognitionAlternativeê°ì²´ë¥¼ í¬í¨í ì ììµëë¤. SpeechRecognitionResultList-
continuous모ëìì 결과를 캡ì²íë ê²½ì°,SpeechRecognitionResultê°ì²´ ëª©ë¡ ëë ë¨ì¼ ê°ì²´ë¥¼ ëíë ëë¤.
ìì± í©ì±(Speech synthesis)
SpeechSynthesis-
ìì± ìë¹ì¤ë¥¼ ìí 컨í¸ë¡¤ë¬ ì¸í°íì´ì¤ë¡, 기기ìì ì¬ì©í ì ìë í©ì± ìì±ì ëí ì 보를 ê²ìíê³ , ìì±ì ìì ë° ì¼ì ì¤ì§íê³ , 기í ëª ë ¹ì ë´ë¦¬ë ë° ì¬ì©í ì ììµëë¤.
SpeechSynthesisErrorEvent-
ìì± ìë¹ì¤ìì
SpeechSynthesisUtteranceê°ì²´ë¥¼ ì²ë¦¬íë ëì ë°ìíë ì¤ë¥ì ëí ì ë³´ê° ë¤ì´ììµëë¤. SpeechSynthesisEvent-
ìì± ìë¹ì¤ìì ì²ë¦¬ë
SpeechSynthesisUtteranceê°ì²´ì íì¬ ìíì ëí ì ë³´ê° ë¤ì´ ììµëë¤. SpeechSynthesisUtterance-
ìì± ìì²ì ëíë ëë¤. ì¬ê¸°ìë ìì± ìë¹ì¤ê° ì½ì´ì¼ íë ì½í ì¸ ì ì½ê¸° ë°©ë²ì ëí ì ë³´(e.g. ì¸ì´, ëë®ì´, ìë ë±)ê° í¬í¨ë©ëë¤.
SpeechSynthesisVoice-
ìì¤í ì´ ì§ìíë ìì±ì ëíë ëë¤. 모ë
SpeechSynthesisVoiceìë ì¸ì´, ì´ë¦ ë° URIì ëí ì 보를 í¬í¨í ê³ ì í ìë ìì± ìë¹ì¤ê° ììµëë¤. Window.speechSynthesis-
SpeechSynthesisGetterë¼ë[NoInterfaceObject]ì¸í°íì´ì¤ì ì¼ë¶ë¡ ì§ì ëê³Windowê°ì²´ì ìí´ êµ¬íëëspeechSynthesisìì±ì ìì± í©ì± 컨í¸ë¡¤ë¬ì ëí ì ê·¼ì ì ê³µíë¯ë¡ ìì± í©ì± 기ë¥ì ì§ì ì ì´ ë©ëë¤.
ìë¬
Speech APIìë ë³´ê³ ëë ì¤ë¥(ì를 ë¤ë©´, "language-not-supported" ë° "language-unavailable")ì ëí ìì¸í ëì©ì ë¤ì 문ì를 참조íì¸ì.
ìì
Githubì Web Speech API ìì ìë ìì± ì¸ì ë° í©ì±ì ì¤ëª íë ë°ëª¨ê° í¬í¨ëì´ ììµëë¤.
ëª ì¸ì
| Specification |
|---|
| Web Speech API > # speechreco-section > |
| Web Speech API > # tts-section > |