from pydantic import BaseModel, Field

class AudioBinary_Config(BaseModel):
    """二进制音频块配置信息"""
    audio_data: bytes = Field(description="音频数据", default=None)
    chunk_size: int = Field(description="块大小", default=100)
    chunk_stride: int = Field(description="块步长", default=1600)
    sample_rate: int = Field(description="采样率", default=16000)
    sample_width: int = Field(description="采样位宽", default=2)
    channels: int = Field(description="通道数", default=1)

class AudioBinary_Chunk(BaseModel):
    """音频块"""
    start_time: int = Field(description="开始时间", default=0)
    end_time: int = Field(description="结束时间", default=0)
    chunk: bytes = Field(description="音频块", default=None)
