Skip to content

v0.0.27

Latest

Choose a tag to compare

@ivan-digital ivan-digital released this 02 Sep 17:56
· 3 commits to main since this release
a2ef1dd

Adds Smart Turn v3.2 end-of-turn detection.

A VAD pause is no longer the end of the turn. SmartTurnModel (Core ML, 8M parameters, 23 languages) listens to the last eight seconds of the user's speech and returns the probability that they have finished. StreamingVADProcessor and VoicePipeline can consult it on every confirmed pause: a finished sentence ends the turn immediately, a mid-sentence pause keeps the agent listening, speech that resumes continues the same turn, and a configurable silence cap (maxSilenceDuration / turnCompletionMaxSilence, 2 s) ends the turn regardless. Eager STT respects the veto, and a classifier that throws fails open so a broken model never stalls a conversation.

  • SmartTurnModel.fromPretrained() loads aufklarer/Smart-Turn-v3.2-CoreML (17 MB); the compiled bundle embeds the Whisper log-mel front-end, so callers pass raw 16 kHz audio. One window takes about 3.5 ms on Apple Silicon; on 1,000 upstream test clips the bundle matches the upstream fp32 model exactly (92.9 %).
  • TurnCompletionProvider protocol in AudioCommon, mirroring speech-core's sc_turn_completion_vtable_t.
  • StreamingVADProcessor(model:config:turnCompletion:turnCompletionConfig:) and init(provider:) over any StreamingVADProvider.
  • VoicePipeline.setTurnCompletion(_:) with PipelineConfig.turnCompletionThreshold and turnCompletionMaxSilence; SpeechCore.xcframework updated to speech-core v0.0.14, which adds the underlying C API.
  • CLI: speech turn <wav> prints the completion probability; speech vad-stream --smart-turn merges segments across mid-sentence pauses.
  • SpeechDemo gets a Smart Turn toggle with per-pause probabilities; iOSEchoDemo attaches the model by default.

Docs: https://soniqo.audio/guides/turn