qwen_asr 0.2.6 copy "qwen_asr: ^0.2.6" to clipboard
qwen_asr: ^0.2.6 copied to clipboard

On-device Qwen3-ASR speech-to-text for Flutter. Pure Rust, no cloud, no server.

qwen_asr WIP #

Work in Progress — This library is still under active development. Use it at your own risk. APIs may change and some features may be incomplete or unstable. I will continue to improve it over time.

On-device Qwen3-ASR speech-to-text for Flutter. Runs entirely on the device using a pure Rust inference engine — no cloud services, no server, no network required. Supports iOS, Android, and macOS.

The native Rust engine is compiled in release mode automatically by the Flutter build pipeline. If building the Rust library manually, always use --release — debug builds are 10–50x slower and unusable for real-time inference.

Setup #

Add the dependency:

dependencies:
  qwen_asr: ^0.1.0

Download the model (e.g. in your app's asset pipeline or at first launch):

huggingface_hub download Qwen/Qwen3-ASR-0.6B --local-dir <your-model-dir>

Usage #

import 'package:qwen_asr/qwen_asr.dart';

// Load the model (once, typically at app start)
final engine = await QAsrEngine.load('/path/to/qwen3-asr-0.6b');

// Transcribe a WAV file
final text = await engine.transcribeFile('/path/to/audio.wav');
print(text);

// Transcribe raw PCM (Float32List, 16 kHz, mono, values in -1..1)
final pcmText = await engine.transcribePcm(samples);

// Transcribe from an in-memory WAV buffer
final bufText = await engine.transcribeWavBuffer(wavBytes);

// Clean up when done
engine.dispose();

Configuration #

// Force a language (e.g. "English", "Chinese"); empty string = auto-detect
engine.setLanguage('English');

// Enable segmented mode for long audio (seconds per segment, 0 = off)
engine.setSegmentSec(30.0);

// Get timing stats from the last transcription
print(engine.perfStats());

Forced Alignment #

Forced alignment (word-level timestamps for a known transcript) is available through the Rust library (qwen_asr::align::forced_align) for native integration. See the crate documentation for details.

Platform Support #

Platform Status
iOS Supported
Android Supported
macOS Supported
Linux Planned
Windows Planned

License #

MIT

2
likes
70
points
20
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

On-device Qwen3-ASR speech-to-text for Flutter. Pure Rust, no cloud, no server.

Repository (GitHub)
View/report issues

Topics

#speech-recognition #asr #machine-learning #audio

License

MIT (license)

Dependencies

flutter, flutter_rust_bridge, plugin_platform_interface

More

Packages that depend on qwen_asr

Packages that implement qwen_asr