Does%20it%20want%20signed%20or%20unsigned%3F%0A%0AWhen%20using%20your%20own%20audio%20fil…
- User
Does%20it%20want%20signed%20or%20unsigned%3F%0A%0AWhen%20using%20your%20own%20audio%20file%20make%20sure%20it%20has%20the%20correct%20format%20-%20PCM%2016khz%2016bit%20mono.%20Otherwise%2C%20if%20you%20have%20ffmpeg%20installed%2C%20you%20can%20use%20test_ffmpeg.py%2C%20which%20does%20the%20conversion%20for%20you.%0A%0A
- Assistant
It seems you're asking about the audio file format requirements for a specific application, and if it needs the audio data to be signed or unsigned.
For PCM audio formats:
- Signed vs. Unsigned:
- Signed PCM is the most common format and it allows for both positive and negative audio amplitude values. Each sample can represent a value from -32768 to 32767 for 16-bit audio.
- Unsigned PCM typically only allows for positive values, ranging from 0 to 65535 for 16-bit audio. This format is less commonly used for audio playback.
Given that your specification mentions "PCM 16khz 16bit mono" without mentioning unsigned, it is safe to assume that signed PCM is the expected format.
-
Using FFmpeg for Conversion: If you have your audio file in a different format, you can use FFmpeg to convert it to the required format using the script
test_ffmpeg.py. Here's an example command for converting audio to the required format:
- Signed vs. Unsigned: