voice_guidance 0.6.2
voice_guidance: ^0.6.2 copied to clipboard
Platform-agnostic voice guidance for navigation apps. Works on mobile (flutter_tts), Linux (spd-say), and silently in CI.
voice_guidance #
"300 meters ahead, turn right." Platform-agnostic voice guidance for navigation — works on mobile (flutter_tts), Linux (spd-say), and silently in CI.
voice_guidance provides a small TTS abstraction so your navigation domain
stays independent from platform speech APIs.
Features #
TtsEngineinterface for pluggable speech engines.FlutterTtsEngineimplementation usingflutter_tts.LinuxTtsEngineimplementation usingspd-sayon Linux.NoOpTtsEnginefor tests and non-audio environments.createDefaultTtsEngine()to pick a safe engine per platform.VoiceGuidanceConfigfor runtime voice settings.
Install #
dependencies:
voice_guidance: ^0.3.0
Quick Start #
import 'package:voice_guidance/voice_guidance.dart';
final tts = createDefaultTtsEngine();
await tts.setLanguage('ja-JP');
await tts.setVolume(1.0);
await tts.speak('300 meters ahead, turn right.');
On Linux, createDefaultTtsEngine() uses spd-say when it is available and
degrades silently when it is not installed.
API Overview #
| API | Purpose |
|---|---|
TtsEngine |
Abstract speech interface |
createDefaultTtsEngine() |
Platform-safe default engine selection |
FlutterTtsEngine |
Real platform speech implementation |
LinuxTtsEngine |
Speech Dispatcher (spd-say) backend for Linux |
NoOpTtsEngine |
Silent fallback for CI/tests |
VoiceGuidanceConfig |
Runtime voice behavior configuration |
Works With #
| Package | How |
|---|---|
| routing_bloc | Route lifecycle events trigger maneuver announcements |
| navigation_safety | Safety alerts trigger spoken hazard warnings |
| routing_engine | Route maneuver text is the source material for voice announcements |
See Also #
- kalman_dr — Dead reckoning through GPS loss
- driving_weather — Weather conditions that trigger hazard speech
- offline_tiles — Offline tile management with MBTiles
Part of SNGNav — 11 packages for offline-first navigation on Flutter.
License #
BSD-3-Clause — see LICENSE.