mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
feat : dont import pyaudio if stt not enabled
This commit is contained in:
parent
771ac22d7f
commit
76f52846de
@ -3,10 +3,8 @@ import queue
|
||||
import threading
|
||||
import numpy as np
|
||||
import torch
|
||||
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
||||
import time
|
||||
import librosa
|
||||
import pyaudio
|
||||
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
||||
|
||||
audio_queue = queue.Queue()
|
||||
done = False
|
||||
@ -16,6 +14,7 @@ class AudioRecorder:
|
||||
AudioRecorder is a class that records audio from the microphone and adds it to the audio queue.
|
||||
"""
|
||||
def __init__(self, format: int = pyaudio.paInt16, channels: int = 1, rate: int = 4096, chunk: int = 8192, record_seconds: int = 5, verbose: bool = False):
|
||||
import librosa
|
||||
import pyaudio
|
||||
self.format = format
|
||||
self.channels = channels
|
||||
|
Loading…
x
Reference in New Issue
Block a user