twin_stream 0.2.0 copy "twin_stream: ^0.2.0" to clipboard
twin_stream: ^0.2.0 copied to clipboard

Simultaneous speech-to-text and audio file recording in a single API. Solves the Android microphone lock issue that prevents using recording and speech recognition at the same time.

0.2.0 #

  • 🧠 True Android Simultaneous STT Support: Added voskModelPath to TwinStreamConfig. When provided, the package leverages vosk_flutter and a custom raw PCM stream-to-WAV writer to fully bypass the Android OS Microphone Lock, allowing true simultaneous recording and offline transcription on strict devices.
  • 🐛 Bug Fix: Addressed Issue #1 by clearing non-fatal STT timeout errors (such as error_speech_timeout) immediately after they are emitted, preventing the duration timer from rebroadcasting the same error to the UI continuously on fallback.

0.1.0 #

  • 🎉 Initial release of twin_stream
  • Simultaneous speech-to-text and audio file recording in a single API
  • Android: Automatic microphone lock fallback (simultaneous → sequential)
  • iOS / macOS: True simultaneous recording and speech recognition
  • TwinStreamController — main API with start(), stop(), cancel(), pause(), resume()
  • TwinStreamConfig — configurable sample rate, encoder, locale, Android strategy
  • TwinStreamState — real-time state stream with live transcript, sound level, recording duration
  • TwinStreamResult — session results with audio file path, transcript, confidence, alternates
  • Custom exception hierarchy: TwinStreamPermissionException, TwinStreamMicrophoneLockException, TwinStreamInitializationException, TwinStreamRecordingException
  • Three Android recording strategies: simultaneousWithFallback, sequential, simultaneousStrict
  • Support for multiple audio encoders: WAV, AAC, Opus, FLAC, PCM
  • Comprehensive documentation and example app
1
likes
130
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Simultaneous speech-to-text and audio file recording in a single API. Solves the Android microphone lock issue that prevents using recording and speech recognition at the same time.

Repository (GitHub)
View/report issues

Topics

#audio #speech-to-text #recording #microphone #speech-recognition

License

MIT (license)

Dependencies

flutter, path, path_provider, record, speech_to_text, vosk_flutter

More

Packages that depend on twin_stream