vosk-api icon indicating copy to clipboard operation
vosk-api copied to clipboard

ONNX format

Open frankiedrake opened this issue 1 year ago • 5 comments

Is it possible (now or as the future release option) to convert vosk models to an onnx format to reduce the model size?

frankiedrake avatar Aug 25 '22 14:08 frankiedrake

It is a great idea!

nshmyrev avatar Aug 25 '22 15:08 nshmyrev

It is a great idea!

Good) But for now, it's impossible to use ONNX, right?

frankiedrake avatar Aug 26 '22 06:08 frankiedrake

Yes

nshmyrev avatar Aug 29 '22 13:08 nshmyrev

@nshmyrev I find this https://github.com/XiaoMi/kaldi-onnx

v-yunbin avatar Aug 30 '22 06:08 v-yunbin

@nshmyrev I find this https://github.com/XiaoMi/kaldi-onnx

I tried to convert vosk model (took file am/final.mdl from model directory, have no idea have I made it right) but for now I didn't succeed. What I did:

main(input_model=os.path.join(model_dir, model_name),
     output=os.path.join(model_dir, new_model_name),
     left_context=3, right_context=3, modulus=1, nnet_type=3)

left_context and right_context took from ivector/splice.conf modulus and nnet_type took from examples somewhere

I got an error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 32: invalid continuation byte I would suppose it cannot recognize the mdl file but this is just an assumption

frankiedrake avatar Sep 01 '22 13:09 frankiedrake