SpeechRecognize

SpeechRecognize[audio]

recognizes speech in audio and returns it as a string.

Details and Options

  • Speech recognition aims to convert a spoken audio signal to text. It is also known as speech-to-text and is typically used in voice-enabled human-machine interactions and digital personal assistants.
  • SpeechRecognize[audio] returns all recognized speech in audio as a single string.
  • The following options can be given:
  • Masking Allinterval of interest
    Method Automaticthe method to use
    TargetDevice"CPU"the device on which to perform recognition
  • By default, speech in the whole signal is recognized. Use Masking->{int1,int2,} to limit the recognition to intervals inti.
  • Possible settings for Method are:
  • "GoogleSpeech"uses Google speech-to-text
    "NeuralNetwork"uses built-in neural networks
    "OpenAI"uses the OpenAI speech-to-text
  • SpeechRecognize only works for English speech.
  • SpeechRecognize uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.
  • SpeechRecognize may download resources that will be stored in your local object store at $LocalBase, and can be listed using LocalObjects[] and removed using ResourceRemove.

Examples

open allclose all

Basic Examples  (2)

Recognize speech in an audio signal:

Recognize speech from a recording:

Options  (2)

Masking  (1)

Use the Masking option to recognize parts of a signal:

Method  (1)

By default, a local model is used for speech recognition:

Use OpenAI speech recognition:

Use GoogleSpeech speech recognition:

Applications  (4)

Use AudioIntervals to select which parts of the signal to recognize:

Interpret a spoken city:

Show the recognized city on the map:

Find the answer from a spoken question in a text:

Build an automatic assistant based on Wolfram|Alpha:

Wolfram Research (2019), SpeechRecognize, Wolfram Language function, https://reference.wolfram.com/language/ref/SpeechRecognize.html (updated 2023).

Text

Wolfram Research (2019), SpeechRecognize, Wolfram Language function, https://reference.wolfram.com/language/ref/SpeechRecognize.html (updated 2023).

CMS

Wolfram Language. 2019. "SpeechRecognize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/SpeechRecognize.html.

APA

Wolfram Language. (2019). SpeechRecognize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpeechRecognize.html

BibTeX

@misc{reference.wolfram_2023_speechrecognize, author="Wolfram Research", title="{SpeechRecognize}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/SpeechRecognize.html}", note=[Accessed: 28-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_speechrecognize, organization={Wolfram Research}, title={SpeechRecognize}, year={2023}, url={https://reference.wolfram.com/language/ref/SpeechRecognize.html}, note=[Accessed: 28-March-2024 ]}