alphacep / alphacep/vosk-api

vosk transcription not loading in jupyter notebook, excessively long loading time that does not conclude

Open
#1,492 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
15.1k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to do ASR speech to text transcription using the VOSK API, I have downloaded all the required models and and imported the required modules however my transcription simply does not load here is my code below

here is my code
`
from vosk import Model, KaldiRecognizer
import os
import queue
import vosk
import sys
import json
import wave
model_dir="data/raw/vosk-model-small-en-us-0.15"
model = vosk.Model(model_dir)
with wave.open("Audio_Files/EN/checkin.wav") as wf:
assert wf.getnchannels() == 1, "must be a mono wav"
assert wf.getsampwidth() == 2, "must be a 16bit wav"
assert wf.getcomptype() == "NONE", "must be PCM data"

rec = vosk.KaldiRecognizer(model, wf.getframerate())
while True:
data = wf.readframes(4000)
if rec.AcceptWaveform(data):
res = json.loads(rec.Result())
print(res["text"])
`
Ive been seeing his result for 40 minutes
![image](https://github.com/alphacep/vosk-api/assets/75297747/a622bfd8-0e75-44a6-bbde-6e49bd122820)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.