rhasspy / wyoming

Peer-to-peer protocol for voice assistants
MIT License
103 stars 17 forks source link

Fix for conversion of 8-bit audio #21

Open Schevv opened 1 month ago

Schevv commented 1 month 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 1 month 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 1 month 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?