WLJS LogoWLJS Notebook

SpeechInterpreter

SpeechInterpreter[form] represents an interpreter object that can be applied to a speech input to try to interpret it as an object of the specified form.

  • SpeechInterpreter[form, test] returns the interpreted object only if applying test to it yields True; otherwise, it returns a Failure object.
  • SpeechInterpreter[form, test, fail] returns the result of applying the function fail if the test fails.

Examples

Interpret speech as a number:

interp = SpeechInterpreter["Number"];
interp[audio]

With validation:

SpeechInterpreter["Integer", Positive]

Please visit the official Wolfram Language Reference for more details.

On this page