You are on page 1of 9

HTML5 Speech API Implementation in Mozilla Firefox

Roshan KV Yamini D Rao


Under the guidance of Manjunath CR

Introduction W3C - Biggest Web Standards Organization HTML Speech Incubator Group proposal
Speech Recognition API Text to Speech API

Use Case Diagram


getElementById(#id)
Set Language

End User Speech Recognition


Start Audio Input
Check User Permission

Speak Text

Text To Speech
TTS Engine

XMLHttpRequest

Return JSON result object

Local/Remote Speech Engine

Use Case Diagram


getElementById(#id)
Set Language

Speak Text TTS Engine

End User

Start Audio Input


Check User Permission

XMLHttpRequest

Return JSON result object

Local/Remote Speech Engine

DATA FLOW DIAGRAM(level 1)

User speech

Javascript API

Recognition result

Data Flow Diagram(level 2)


ALSA - Linux User Speech Portaudio - Mac

FLAC/Speex Encoder

Win32 API - Windows


Google Speech Server Result Object

DATA FLOW DIAGRAM(LEVEL 3)

Example: SpeechReco <script type="text/javascript"> var sr = new SpeechReco(); sr.onresult = function(event) { var q = document.getElementById("q"); q.value = event.result[0].transcript; q.form.submit(); } </script>

<form action="http://www.example.com/search"> <input type="search" id="q" name="q"> <input type="button" value="Speak onclick="sr.start()"> </form>

Text To Speech <script type="text/javascript"> var tts = new TTS(); function speak(text, lang) { tts.text = text; tts.lang = lang; tts.play(); } speak("Hello world.", "en-US"); </script>