alphacep / alphacep/vosk-api

`Exception: Failed to create a model` when using `BatchModel`

未關閉
#1,269 9 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
15.1k
分支
1.8k
PR 合併指標
30 天內沒有已合併 PR

描述

## Description
I wanted to test inference on GPU with `BatchModel`. So I started by downloading [vosk-model-en-us-0.22.zip](https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip) and extracting it in a directory named `model` in the same directory where `python/example/test*` are.

While using the `test_simple` works fine for this model
```bash
python test_simple.py test.wav
```
Using the `test_gpu_batch` yields the following error:
```bash
Traceback (most recent call last):
File "test_gpu_batch.py", line 13, in
model = BatchModel("model")
File "/home/sadra/image-captioning/.venv/lib/python3.8/site-packages/vosk/__init__.py", line 243, in __init__
raise Exception("Failed to create a model")
Exception: Failed to create a model
```
I wanted to know what can I do to make it work

## Environment Details
+ Vosk version: `0.3.45`
+ Python version: `3.8.10`
+ kernel / OS: `5.15.0-57-generic` / `20.04.1-Ubuntu`

## Minor Notes
+ I also tested [asr_server_gpu.py](https://github.com/alphacep/vosk-server/blob/master/websocket-gpu-batch/asr_server_gpu.py) which exited with the exact same error/
+ I chose the English model - the one which suits GPU - from this [docker](https://github.com/alphacep/vosk-server/blob/master/docker/Dockerfile.kaldi-en-gpu) image.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。