Upgrade to Pro — share decks privately, control downloads, hide ads and more …

web_speech_api.pdf

cha1ra
January 19, 2019
340

 web_speech_api.pdf

cha1ra

January 19, 2019
Tweet

Transcript

  1. 7 K M GB D n K M 8 51

    AC E 1 ( 1 - o bO meg d T @ k C b i L JHP _ c 4 77 4 ) 4 4 2 R @ rsa
  2.       const recognition = new

    webkitSpeechRecognition() recognition.lang = 'ja-JP’ recognition.start() recognition.onresult = (event) => { onsole.log(event.results[0][0].transcript) recognition.stop() }
  3. . 1 . 1 # interface SpeechRecognition : EventTarget {

    // recognition parameters attribute SpeechGrammarList grammars; attribute DOMString lang; attribute boolean continuous; attribute boolean interimResults; attribute unsigned long maxAlternatives; attribute DOMString serviceURI; // methods to drive the speech interaction void start(); void stop(); void abort(); // event methods attribute EventHandler onaudiostart; attribute EventHandler onsoundstart; attribute EventHandler onspeechstart; attribute EventHandler onspeechend; attribute EventHandler onsoundend; attribute EventHandler onaudioend; attribute EventHandler onresult; attribute EventHandler onnomatch; attribute EventHandler onerror; attribute EventHandler onstart; attribute EventHandler onend; }; 33 -3 -/ - / 3-/. / .-3-/.
  4.       const recognition = new

    webkitSpeechRecognition() recognition.lang = 'ja-JP’ recognition.start() recognition.onresult = (event) => { onsole.log(event.results[0][0].transcript) recognition.stop() }
  5. . . # 33 -3 -/ - / 3-/. interface

    SpeechSynthesis : EventTarget { readonly attribute boolean pending; readonly attribute boolean speaking; readonly attribute boolean paused; attribute EventHandler onvoiceschanged; void speak(SpeechSynthesisUtterance utterance); void cancel(); void pause(); void resume(); sequence<SpeechSynthesisVoice> getVoices(); }; interface SpeechSynthesisUtterance : EventTarget { attribute DOMString text; attribute DOMString lang; attribute SpeechSynthesisVoice? voice; attribute float volume; attribute float rate; attribute float pitch; attribute EventHandler onstart; attribute EventHandler onend; attribute EventHandler onerror; attribute EventHandler onpause; attribute EventHandler onresume; attribute EventHandler onmark; attribute EventHandler onboundary; }; .3 - .3 - 33 .
  6. (0 ) ) . 1 . 2 6 9 1

    / C I / 4 P AS 1 : ./ / / . -: / / //-1
  7.