You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files.
paramName
( optional enumerated Type array of paramType )
Undocumented.
Description of this parameter from the json schema.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
Parameters

Google Chrome Extensions (Labs)

chrome.experimental.speechInput

For information on how to use experimental APIs, see the chrome.experimental.* APIs page.

API reference: chrome.experimental.speechInput

Methods

isRecording

void chrome.experimental.speechInput.isRecording(, function callback)

Determine if audio recording is currently in process in Chrome, not limited to this API.

Parameters

callback
( optional Type array of function )
Undocumented.
Description of this parameter from the json schema.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Returns

Callback function

The callback parameter should specify a function that looks like this:

If you specify the callback parameter, it should specify a function that looks like this:

function(boolean result) {...};
result
( Type array of boolean )
Flag set to true if recording is in process in Chrome, false otherwise.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

This function was added in version . If you require this function, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

start

void chrome.experimental.speechInput.start(, SpeechInputStartOptions options, function callback)

Request to start recording as a new speech recognition session.

Parameters

options
( optional SpeechInputStartOptions array of paramType )
Options used for this speech recognition session.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
callback
( optional Type array of function )
Called when the speech recognition session has successfully started recording.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Returns

Callback function

The callback parameter should specify a function that looks like this:

If you specify the callback parameter, it should specify a function that looks like this:

function() {...};

This function was added in version . If you require this function, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

stop

void chrome.experimental.speechInput.stop(, function callback)

Request to stop an ongoing speech recognition session.

Parameters

callback
( optional Type array of function )
Called when the audio recording has stopped and any pending recognition results have been completed.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Returns

Callback function

The callback parameter should specify a function that looks like this:

If you specify the callback parameter, it should specify a function that looks like this:

function() {...};

This function was added in version . If you require this function, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Events

onError

chrome.experimental.speechInput.onError.addListener(function(SpeechInputError error) {...});

Called in case of an error in speech recognition.

Listener parameters

error
( SpeechInputError array of paramType )
Error being reported.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Extra parameters to addListener

Listener returns

onResult

chrome.experimental.speechInput.onResult.addListener(function(SpeechInputResultEvent event) {...});

Called when speech recognition results are available.

Listener parameters

event
( SpeechInputResultEvent array of paramType )
Object containing the speech recognition results.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

Extra parameters to addListener

Listener returns

onSoundEnd

chrome.experimental.speechInput.onSoundEnd.addListener(function() {...});

Called when the system detects enough silence to consider the ongoing speech has ended.

Listener parameters

Extra parameters to addListener

Listener returns

onSoundStart

chrome.experimental.speechInput.onSoundStart.addListener(function() {...});

Called when the system starts detecting sound in the input data.

Listener parameters

Extra parameters to addListener

Listener returns

Types

SpeechInputStartOptions

paramName
( Type array of object )
Object describing the options used for speech recognition.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
language
( optional Type array of string )
BCP-47 language code of the language to recognize. When set to 'auto' or not defined defaults to user's most preferred content language. Will use 'en-US' if not supported or invalid.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
grammar
( optional Type array of string )
Name of the grammar to use. Defaults to 'builtin:search'.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
filterProfanities
( optional Type array of boolean )
Enable or disable profanity filtering. Will use the default Chrome filtering settings if not set.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

SpeechInputError

paramName
( Type array of object )
Object describing a speech input error.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
code
( enumerated Type array of string ["noSpeechHeard", "noResults", "captureError", "networkError"] )
Code identifying the error case.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

SpeechInputResultHypothesis

paramName
( Type array of object )
Object describing a speech recognition hypothesis.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
utterance
( Type array of string )
Text of this hypothesis.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
confidence
( Type array of number )
Confidence of the hypothesis. Rated from 0 (lowest) to 1 (highest).
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.

SpeechInputResultEvent

paramName
( Type array of object )
Object containing the recognition results.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.
hypotheses
( optional Type array of SpeechInputResultHypothesis array of paramType paramType )
Array of zero or more objects describing the stable candidate hypotheses sorted by decreasing likelihood.
This parameter was added in version . You must omit this parameter in earlier versions, and you may omit it in any version. If you require this parameter, the manifest key minimum_chrome_version can ensure that your extension won't be run in an earlier browser version.