mobiler 0.21.0

Build mobile apps in Rust — one core, native UI on Android, iOS, and the web (CLI)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
name = "speech"
summary = "Speech-to-text dictation → recognized text (free)"

[android]
# Uses the system RecognizerIntent dialog (no RECORD_AUDIO permission — the recognizer UI
# handles the mic). A transparent helper Activity owns the ActivityResult.
sources = ["android/SpeechPlugin.kt", "android/SpeechActivity.kt"]
register = '"speech" to SpeechPlugin(application)'
manifest_application = ['<activity android:name=".SpeechActivity" android:exported="false" android:theme="@android:style/Theme.Translucent.NoTitleBar" />']

[ios]
# SFSpeechRecognizer live-audio recognition (op "listen"). Requests speech + mic permission.
sources = ["ios/SpeechPlugin.swift"]
register = 'case "speech": return await SpeechPlugin.handle(op: op, input: input)'

[ios.info_plist]
NSSpeechRecognitionUsageDescription = "Transcribe your speech to text."
NSMicrophoneUsageDescription = "Record audio for speech recognition."