SpeechRecognitionPhrase

open class SpeechRecognitionPhrase(val phrase: String, val boost: Float = definedExternally)(source)

The SpeechRecognitionPhrase interface of the Web Speech API represents a phrase that can be passed to the speech recognition engine for contextual biasing. Available only in secure contexts.

MDN Reference

Constructors

Link copied to clipboard
constructor(phrase: String, boost: Float = definedExternally)

Properties

Link copied to clipboard
open external val boost: Float

The boost read-only property of the SpeechRecognitionPhrase interface returns a floating point number representing the weight you want to give the corresponding phrase.

Link copied to clipboard
open external val phrase: String

The phrase read-only property of the SpeechRecognitionPhrase interface returns a string containing the word or phrase you want boosted in the recognition engine's contextual bias.