RunAnywhere.voice assembles speech-to-text, a language model, and text-to-speech into one
session that listens, thinks, and answers out loud. It owns the microphone while it runs.
Signature
VoiceSession
say speaks a line without waiting for the user, which is how you greet someone. interrupt
cuts off whatever is being spoken.
Always close() the session. It holds the microphone, and on macOS the menu-bar recording
indicator stays lit until you do.
Turn handling
Raise
interruption.minDurationMs in a noisy room, or a cough cuts the model off.
Steering the replies
Closing on window close
before-quit
keeps recording after the user thinks they stopped.
Three models at once
A voice session holds a speech model, a language model, and a synthesis model together. A desktop has the headroom for this, but see residency policy when a chat model is also loaded, or the session will evict it on every turn.Microphone permission
On macOS, addNSMicrophoneUsageDescription to the app’s Info.plist. The session cannot start
without consent, and a denial persists until the user changes it in System Settings.