← Previous: ODAS Data Format | Next: Streaming ODAS Audio Player →
ODAS produces several types of audio output files with different characteristics:
- Sample rate: 16000 Hz
- Bit depth: 32-bit
- Channels: 8 (for ReSpeaker 6 Mic Array)
- Format: Signed integer, little-endian
- Sample rate: 44100 Hz
- Bit depth: 16-bit
- Channels: 4 (separated audio streams)
- Format: Signed integer, little-endian
play -r 16000 -b 32 -c 8 -e signed-integer -t raw input.rawThe postfiltered output contains 4 channels of separated audio. Here are different ways to play it:
- Play all 4 channels (correct speed but may be unbalanced):
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw- Mix all channels to stereo (both ears):
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 1,2,3,4 1,2,3,4- Map specific channels to left and right:
# Channels 1+2 in left, 3+4 in right
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 1,2 3,4
# Channels 1+3 in left, 2+4 in right
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 1,3 2,4- Listen to individual channels:
# Channel 1 only
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 1
# Channel 2 only
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 2
# Channel 3 only
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 3
# Channel 4 only
play -r 44100 -b 16 -c 4 -e signed-integer -t raw postfiltered.raw remix 4- The postfiltered output contains separated audio streams in 4 channels
- Different channel mappings may work better depending on your setup
- Always use the correct sample rate and channel count to maintain proper playback speed
Host:
scp hexapod@192.168.0.122:/home/hexapod/hexapod/postfiltered.raw .
./hexapod/odas/convert_odas_audio.py ~/postfiltered.raw test.wav
afplay test.wav
Target:
python hexapod/odas/odas_server.py
./hexapod/odas/convert_odas_audio.py postfiltered.raw test.wav
./hexapod/odas/test_picovoice_complete.py test.wav --access-key ACCESS_KEY
← Previous: ODAS Data Format | Next: Streaming ODAS Audio Player →