Class: shaka.text.SpeechRecognitionController

Constructor

new SpeechRecognitionController(translatorControllernon-null, timernon-null, onText, onClear)

Parameters:
Name Type Description
translatorController shaka.text.SpeechTranslatorController
timer shaka.util.Timer
onText function
onClear function
Implements:
Source:

Members

active_ :boolean

Type:
  • boolean
Source:

onClear_ :function()

Type:
  • function()
Source:

onText_ :function(string)

Type:
  • function(string)
Source:

recognition_ :ChromeSpeechRecognition

Type:
  • ChromeSpeechRecognition
Source:

version_ :number

Type:
  • number
Source:

Methods

isActive() → {boolean}

Source:
Returns:
Type
boolean

release()

Request that this object release all internal references.
Implements:
Source:

start(mediaStreamTracknon-null, sourceLanguage, processLocally) → {Promise}

Parameters:
Name Type Description
mediaStreamTrack MediaStreamTrack
sourceLanguage string
processLocally boolean
Source:
Returns:
Type
Promise

stop(clearopt)

Parameters:
Name Type Attributes Default Description
clear boolean <optional>
true
Source: