rhasspy / wyoming

Peer-to-peer protocol for voice assistants
MIT License
138 stars 20 forks source link

Fix for conversion of 8-bit audio #21

Open Schevv opened 4 months ago

Schevv commented 4 months ago

When converting wave audio that is 8 bit (either input or output format) with audioop we need to care about the signedness of the 8-bit audio (see docs for audioop.lin2lin)

synesthesiam commented 4 months ago

We need to add bias to pyaudioop first so this will continue working after Python 3.13 where they will drop the audioop module.

Schevv commented 4 months ago

Maybe it is easier in that case to replace the call to bias with a simple loop? It is simple to implement for the edge-case (8 bit) we have here. That is easier than to create the bias function for the general case and having to maintain it?