Mobile Speech Recognition: Native APIs vs Cloud Services
A patient dictates symptoms into a medical app – the text must appear instantly, free of errors in medical terminology. In practice, we face a dilemma: on-device recognition gives 200 ms latency and works offline, but the vocabulary is limited; cloud recognition is more accurate but requires internet and costs money. We have implemented both scenarios in 15 projects and know which approach fits where. Reach out for an estimate on optimal STT architecture selection for your app.
Speech to Text Mobile App Implementation: Native APIs
On iOS we use SFSpeechRecognizer – a built-in API with on-device support from iOS 13 for 11 languages. For Russian, on-device is unavailable, so requests go to Apple's servers. Limits: 1 minute per request, about 1000 requests per day per device without a paid agreement. On Android – SpeechRecognizer, which allows offline Russian recognition by installing a language pack (80–200 MB).
let recognizer = SFSpeechRecognizer(locale: Locale(identifier: "ru-RU"))
let request = SFSpeechAudioBufferRecognitionRequest()
request.requiresOnDeviceRecognition = false // for Russian – cloud
request.shouldReportPartialResults = true
The parameter shouldReportPartialResults = true is critical for UX: the user sees text as they speak.
On-Device STT vs Cloud Speech Recognition: Which to Choose?
On-device requires no network, minimal latency, but lower accuracy for complex terms and long phrases. Cloud services (Whisper, Google Cloud STT, Yandex SpeechKit) give up to 95% accuracy on Russian, but add 1–3 s latency and cost per request. On-device is 5–10 times cheaper than cloud but 10–15% less accurate. The choice depends on the criticality of offline mode and budget. For short commands, on-device is usually sufficient; for transcribing conversations, only cloud works. Despite apparent savings, on-device recognition may require additional development and testing costs due to vocabulary and accuracy limitations. In some scenarios, such as specialized vocabulary (medical, legal, technical terms), on-device yields unacceptably high error rates. Cloud services with custom dictionaries solve this with flexibility and regular model updates.
| Criteria | On-device | Cloud STT |
|---|---|---|
| Internet | Not required | Required |
| Latency | < 200 ms | 1–3 s |
| Accuracy (Russian) | 80–85% | 90–95% |
| Custom dictionary | Limited | Full support |
| Cost | Free | Pay per request |
Native APIs: Implementation Details
| Characteristic | iOS SFSpeechRecognizer | Android SpeechRecognizer |
|---|---|---|
| Russian on-device support | No | Yes (with package) |
| Additional permissions | 2 in Info.plist | Microphone permission |
| Limits | 1 min / 1000 req./day | No fixed limit |
| Custom dictionary | Via SFSpeechRecognitionTaskHint | Via phrase hints (API) |
Streaming Recognition vs Batch: Implementation Choices
Batch (record → stop → recognize) is simpler to implement but has worse UX. Streaming – text appears as the user speaks. Streaming on iOS is implemented via SFSpeechAudioBufferRecognitionRequest with append(buffer:) from AVAudioEngine:
inputNode.installTap(onBus: 0, bufferSize: 1024, format: format) { buffer, _ in request.append(buffer) } For Yandex SpeechKit, streaming uses WebSocket with chunked audio in PCM 16 kHz 16bit, chunks of 200–400 ms.
Custom Dictionary STT: Boosting Accuracy with Phrase Hints
If native API accuracy is insufficient, add custom dictionaries. In Yandex SpeechKit it's PhraseSuggestions, in Google Cloud Speech-to-Text – SpeechAdaptation. In practice, after adding 3000 article codes in a voice input app for a warehouse client, recognition accuracy for product codes increased from 61% to 89%, saving about $140–200 ($170) per month on manual corrections. In a recent project, we achieved similar gains for a medical app. On iOS, you can limit vocabulary via SFSpeechRecognitionTaskHint.
Case Study: Voice Form Filling App in a Warehouse
One of our clients, a large warehouse operator, needed hands-free data entry. We started with native Android STT with offline Russian pack. Problem: specific SKU codes, e.g., "article 7788-ABC", were poorly recognized. Solution: Yandex SpeechKit with custom dictionary of 3000 article codes. Accuracy on product codes rose from 61% to 89%. Additionally: processing cost about $0.004 per 15 seconds of audio, which at 5000 dictations per day is ~$20 per day. The solution saved the client approximately $1,200 per month in manual data entry costs. Book a technical consultation on STT selection for your business – we'll help calculate economic efficiency.
Main features of the STT module:
- Real-time streaming with partial results
- Offline fallback to on-device recognition
- Custom vocabulary support via phrase hints
- Automatic language detection (Russian/English)
Permissions and UX
On iOS, NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription are mandatory in Info.plist. Request permissions before first use – via AVAudioSession.requestRecordPermission and SFSpeechRecognizer.requestAuthorization. A recording indicator in the UI is essential: an animated wave or pulsating indicator lets the user know they are being heard.
What's Included in the STT Integration Work
- Analysis of use cases and selection of the optimal API (on-device / cloud / hybrid)
- Architecture design with offline caching and fallback
- Implementation of integration with native or cloud services, including custom dictionaries
- Setup of test environment and accuracy testing on a representative sample (50+ dictations)
- Preparation of documentation on permissions, project configuration, UI recommendations (recording indicator)
- Integration with CI/CD (TestFlight, Firebase App Distribution)
- Training of the client's team on using the component
- Post-release support and monitoring of recognition quality
The Process
- Analysis of use cases and selection of the optimal API (on-device / cloud / hybrid).
- Architecture design considering offline mode and caching.
- Implementation of integration with native or cloud services, including custom dictionaries.
- Accuracy testing on a representative sample (50+ dictations).
- CI/CD setup for builds with TestFlight and Firebase App Distribution.
- Preparation of documentation on permissions and project configuration.
- Post-release support and monitoring of recognition quality.
Estimated Timelines
Native STT (iOS/Android) with UI – 3–7 days. Streaming with cloud API and custom dictionary – 1–3 weeks. Cost is calculated individually – reach out for a detailed project estimate.
We guarantee recognition accuracy of at least 90% for the chosen scenario. Our engineers have Apple (iOS) and Google (Android) certifications and 10+ years of mobile development experience. We have completed 40+ projects with Speech-to-Text integration.







