first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""Модуль 2: audio_io — запись и воспроизведение звука.
|
||||
|
||||
Кроссплатформенно (Linux для разработки, Windows — цель).
|
||||
Состав: Recorder (push-to-talk буфер в RAM), Player (мгновенный stop = «Замолчи»),
|
||||
ресемплинг в 16 кГц mono для STT.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from .player import Player
|
||||
from .recorder import Recorder
|
||||
from .resample import resample_to_16k
|
||||
from .handsfree import HandsFreeRecorder
|
||||
|
||||
__all__ = ["Player", "Recorder", "HandsFreeRecorder", "resample_to_16k", "list_devices"]
|
||||
|
||||
|
||||
def list_devices() -> None:
|
||||
"""Печать аудио-устройств (вход/выход) — для диагностики."""
|
||||
import sounddevice as sd
|
||||
|
||||
print(sd.query_devices())
|
||||
default_in = sd.default.device[0]
|
||||
default_out = sd.default.device[1]
|
||||
print(f"\nПо умолчанию: вход={default_in}, выход={default_out}")
|
||||
Reference in New Issue
Block a user