Skip to content

Conversation

@lunn
Copy link

@lunn lunn commented Sep 4, 2025

When writing the audio sample, struct.pack() is used to convert the integer sample value into a byte like object. Using 'i' results in a 4 byte object, where as a 2 byte object is expected. As a result the waveform ends up being twice the required frequency, and so not valid DTMF tones.

Use the 'h' formatter, so a int16 is generated.

When writing the audio sample, struct.pack() is used to convert the
integer sample value into a byte like object. Using 'i' results in a 4
byte object, where as a 2 byte object is expected. As a result the
waveform ends up being twice the required frequency, and so not valid
DTMF tones.

Use the 'h' formatter, so a int16 is generated.

Signed-off-by: Andrew Lunn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant