problems with calling Vosk from coroutine
- Linguagem predominante
- Jupyter Notebook
- Estrelas
- 15.1k
- Forks
- 1.8k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.