vosk-api
vosk-api copied to clipboard
Runtime printed these warnings: CheckMemoryUsage() ... Rebuilding repository
vosk 0.3.37 Do I need to deal with this WARNING ?
LOG (VoskAPI:RebuildRepository():determinize-lattice-pruned.cc:283) Rebuilding repository.
LOG (VoskAPI:RebuildRepository():determinize-lattice-pruned.cc:283) Rebuilding repository.
LOG (VoskAPI:RebuildRepository():determinize-lattice-pruned.cc:283) Rebuilding repository.
WARNING (VoskAPI:CheckMemoryUsage():determinize-lattice-pruned.cc:316) Did not reach requested beam in determinize-lattice: size exceeds maximum 50000000 bytes; (repo,arcs,elems) = (20747456,2102464,27156216), after rebuilding, repo size was 13385536, effective beam was 5.8168 vs. requested beam 6
LOG (VoskAPI:RebuildRepository():determinize-lattice-pruned.cc:283) Rebuilding repository.
How to reproduce them?
audio: https://transfer.sh/Oax5b2/temp.wav
model: https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip
wf = wave.open(f"temp.wav", "rb")
if (
wf.getnchannels() != 1
or wf.getsampwidth() != 2
or wf.getcomptype() != "NONE"
):
print("Audio file must be WAV format mono PCM.")
exit(1)
model = Model("model")
rec = KaldiRecognizer(model, wf.getframerate())
rec.SetWords(True)
result = []
text = ""
while True:
data = wf.readframes(4000)
if len(data) == 0:
break
if rec.AcceptWaveform(data):
print(f"rec.Result() = {rec.Result()}")
else:
print(rec.PartialResult())
pass
You can ignore these warnings from now, they are from large pieces of music in your recording. We might work on such audios in the future, for now it is just a warning.
Thank you, the accuracy and speed of VOSK are very good.
Same issue as #1127