@telzino/voice is the framework-independent browser client.
new TelzinoVoice(config)
Provide either
publishableKey or session. With neither, start() rejects with invalid_request.
start(opts, hooks?)
start() asks for microphone permission, so call it from a user gesture such as a button click.
The optional second argument hooks is { onCall?: (call: VoiceCall) => void }. onCall fires synchronously once the call object exists, before it emits connecting. Use it to subscribe to events from the start, or to call end() while the call is still connecting.
VoiceCall
start() resolves to a VoiceCall once the connection is up.
final is false for partial text and true once the line is complete. Items keep the same id across updates.
Audio playback
Browsers can block audio until the user interacts with the page. When that happens,needsUserGesture becomes true and a needsUserGesture event fires. Show a button and call resumeAudio() from its click handler.
