Skip to content

Support raw 16 bit PCM data #417

@boxerab

Description

@boxerab

in def get_audio_from_websocket(self, websocket): we can call

audio_np = np.frombuffer(audio_data, dtype=np.int16)
# Normalize to float32 range [-1.0, 1.0]
return audio_np.astype(np.float32) / 32768.0

if flag set on server to specify raw PCM input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions