Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion RealtimeSTT/audio_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
AUDIO_FORMAT = pyaudio.paInt16
CHANNELS = 1

logger = logging.getLogger("realtimestt")

class AudioInput:
def __init__(
self,
Expand Down Expand Up @@ -74,7 +76,7 @@ def _get_best_sample_rate(self, actual_device_index, desired_rate):
return int(device_info.get('defaultSampleRate', 44100))

except Exception as e:
logging.warning(f"Error determining sample rate: {e}")
logger.warning(f"Error determining sample rate: {e}")
return 44100 # Safe fallback

def list_devices(self):
Expand Down
Loading