Skip to content
ForgeCastDocs

The microphone

Voice commands and live captions, with Windows' own speech recognition.

Functions

speech.listen(phrases, handler, opts)

Voice commands: only these phrases count (1 to 50, a few words each), and works offline. Calling it again replaces the list.

Name

Type

Returns integer id

speech.listen({ "clip that", "start the timer" }, function(h)
  if h.phrase == "clip that" then obs.save_replay() end
end)

speech.stop()

Stop listening for this plugin's phrases.

captions.on(handler)

Live captions (Event.Captions): what the streamer says, as it is said (final false) and when a sentence is done (final true). Needs Windows' online speech recognition setting on.

  • handler: fun(c: { text: string, final: boolean })

Returns integer id

captions.off(id)

Stop a handler made with captions.on.

  • id: integer

Returns boolean found

Types

Open a type to see its fields; type names above link here.

On this page