alphacep / alphacep/vosk-api

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

Offen
#1,269 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
15.1k
Forks
1.8k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.