Android RecognizerThread should generate OnError instead of runtimeException when nread < 0
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 15.1k
- Fork
- 1.8k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The problem is when there is a problem with Android AudioRecord, the error condition generates a runtime exception that can't be trapped within my app.
The problem is in: /vosk-api/android/lib/src/main/java/org/vosk/android/SpeechService.java
At line 227, instead of generating a runtime exception, it would be better if it could generate something that ends up in "onError". This is my suggested code fix.
if (nread < 0) {
IOException ioe = new IOException(
"error reading audio buffer. code= " + nread);
mainHandler.post(() -> listener.onError(ioe));
}
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.