Module: watson-speech/speech-to-text/recognize-microphone

(require("watson-speech/speech-to-text/recognize-microphone"))(options) → {RecognizeStream|SpeakerStream|FormatStream|ResultStream}

Create and return a RecognizeStream sourcing audio from the user's microphone

Parameters:
Name Type Description
options Object

Also passed to {RecognizeStream}, and {FormatStream} when applicable

Properties
Name Type Attributes Default Description
token String

Auth Token - see https://github.com/watson-developer-cloud/node-sdk#authorization

format Boolean <optional>
true

pipe the text through a FormatStream which performs light formatting. Also controls smart_formatting option unless explicitly set.

keepMicrophone Boolean <optional>
false

keeps an internal reference to the microphone stream to reuse in subsequent calls (prevents multiple permissions dialogs in firefox)

outputElement String | DOMElement <optional>

pipe the text to a WriteableElementStream targeting the specified element. Also defaults objectMode to true to enable interim results.

extractResults Boolean <optional>
false

pipe results through a ResultStream stream to simplify the objects. (Default behavior before v0.22) Requires objectMode.

resultsBySpeaker Boolean <optional>
false

Pipe results through a SpeakerStream. Forces speaker_labels and objectMode to be true.

mediaStream MediaStream <optional>

Optionally pass in an existing MediaStream

Source:
Returns:
Type
RecognizeStream | SpeakerStream | FormatStream | ResultStream