alphacep / alphacep/vosk-api

problems with calling Vosk from coroutine

Đang mở
#901 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
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ả

What could be the reason the `handler` in `StorageService.unpack()` below (from vosk-api) never delivers the message?
```
public static void unpack(Context context, String sourcePath, final String targetPath, final Callback completeCallback, final Callback errorCallback) {
Executor executor = Executors.newSingleThreadExecutor(); // change according to your requirements
Handler handler = new Handler(Looper.getMainLooper());
executor.execute(() -> {
try {
final String outputPath = sync(context, sourcePath, targetPath);
Model model = new Model(outputPath);
handler.post(() -> completeCallback.onComplete(model)); <<============
} catch (final IOException e) {
handler.post(() -> errorCallback.onComplete(e));
}
});
}
```
The logs look fine IMHO. Do you agree?
```
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us
V/StorageService: Copy model-en-us/README to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/am
V/StorageService: Copy model-en-us/am/final.mdl to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/conf
V/StorageService: Copy model-en-us/conf/mfcc.conf to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/conf/model.conf to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/graph
V/StorageService: Copy model-en-us/graph/Gr.fst to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/graph/HCLr.fst to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/graph/disambig_tid.int to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/graph/phones
V/StorageService: Copy model-en-us/graph/phones/word_boundary.int to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Making directory /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/ivector
V/StorageService: Copy model-en-us/ivector/final.dubm to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/ivector/final.ie to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/ivector/final.mat to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/ivector/global_cmvn.stats to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/ivector/online_cmvn.conf to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/ivector/splice.conf to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
V/StorageService: Copy model-en-us/uuid to /storage/emulated/0/Android/data/de.lichessbyvoice/files/model
I/VoskAPI: ReadDataFiles():model.cc:213) Decoding params beam=10 max-active=3000 lattice-beam=2
I/VoskAPI: ReadDataFiles():model.cc:216) Silence phones 1:2:3:4:5:6:7:8:9:10
I/VoskAPI: RemoveOrphanNodes():nnet-nnet.cc:948) Removed 0 orphan nodes.
I/VoskAPI: RemoveOrphanComponents():nnet-nnet.cc:847) Removing 0 orphan components.
I/VoskAPI: CompileLooped():nnet-compile-looped.cc:345) Spent 0.0469851 seconds in looped compilation.
I/VoskAPI: ReadDataFiles():model.cc:248) Loading i-vector extractor from /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/ivector/final.ie
I/VoskAPI: ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
I/VoskAPI: ComputeDerivedVars():ivector-extractor.cc:204) Done.
I/VoskAPI: ReadDataFiles():model.cc:281) Loading HCL and G from /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/graph/HCLr.fst /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/graph/Gr.fst
I/VoskAPI: ReadDataFiles():model.cc:302) Loading winfo /storage/emulated/0/Android/data/de.lichessbyvoice/files/model/model-en-us/graph/phones/word_boundary.int
```

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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.