flutter_ai_voice 0.1.0 copy "flutter_ai_voice: ^0.1.0" to clipboard
flutter_ai_voice: ^0.1.0 copied to clipboard

Speech-to-text contracts and models for flutter_ai: a batch-first SpeechToText interface, transcript models, and a callback adapter. Concrete engines (Whisper and friends) plug in behind the interface.

flutter_ai_voice #

Live voice orb

Speech-to-text contracts and models for the flutter_ai family. Dependency-free; concrete engines plug in behind the interface.

Why batch-first #

Native OS speech recognition has awkward limits (iOS cuts off after ~1 minute), so the reliable flow is: record → transcribe a finished buffer → send the text. Continuous transcribeStream is offered for live captions but is best-effort.

API #

  • SpeechToTexttranscribeBytes, transcribeFile, transcribeStream.
  • Transcript / TranscriptSegment / TranscriptPartial — result models.
  • CallbackSpeechToText — wrap any transcribe function without a full class.

Usage #

import 'package:flutter_ai_voice/flutter_ai_voice.dart';

// Adapt any engine (on-device Whisper, a cloud API, …) in one line:
final stt = CallbackSpeechToText(
  transcribe: (audio, {mediaType, language}) => myWhisper.run(audio),
);

final transcript = await stt.transcribeBytes(recordedBytes);
controller.sendText(transcript.text); // feed into flutter_ai_client

Plugging in a real engine #

Implement SpeechToText directly, or pass a function to CallbackSpeechToText. On-device options like whisper_ggml/whisper_kit and cloud services are intentionally not dependencies here, so the package stays light — wire your chosen engine in the host app or a dedicated adapter package.

Status #

0.1.0. Interface + models + callback adapter, fully unit-tested. No concrete audio engine ships in this package.

0
likes
0
points
45
downloads

Publisher

verified publishermouazanan.dev

Weekly Downloads

Speech-to-text contracts and models for flutter_ai: a batch-first SpeechToText interface, transcript models, and a callback adapter. Concrete engines (Whisper and friends) plug in behind the interface.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #speech-to-text #voice #transcription #flutter

License

unknown (license)

More

Packages that depend on flutter_ai_voice