You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model = vosk.Model("vosk-model-de-0.21")
device = sd.default.device
samplerate = int(sd.query_devices(device[0], 'input')['default_samplerate'])
q = queue.Queue()
def callback(indata, frames, time, status):
q.put(bytes(indata))
print("Sag etwas.")
with sd.RawInputStream(
samplerate=samplerate,
blocksize=8000,
device=device[0],
dtype='int16',
channels=1,
callback=callback):
rec = vosk.KaldiRecognizer(
model,
samplerate)
while True:
data = q.get()
if rec.AcceptWaveform(data):
result = json.loads(rec.Result())
print(result['text'])
Interrupt Kernel
Traceback
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 552, in switch_to_pluginself.layouts.switch_to_plugin(plugin, force_focus=force_focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'NoneType' object has no attribute 'switch_to_plugin'
Hi @FlorianBethe thank you for the report! Seems like this is a duplicate of #22639 I think a way for users to provided a better traceback is being worked on over PR #22672
Description
What steps will reproduce the problem?
pip install vosk
import vosk
import sys
pip install sounddevice
import sounddevice as sd
import queue
import json
model = vosk.Model("vosk-model-de-0.21")
device = sd.default.device
samplerate = int(sd.query_devices(device[0], 'input')['default_samplerate'])
q = queue.Queue()
def callback(indata, frames, time, status):
q.put(bytes(indata))
print("Sag etwas.")
with sd.RawInputStream(
samplerate=samplerate,
blocksize=8000,
device=device[0],
dtype='int16',
channels=1,
callback=callback):
Interrupt Kernel
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: