Chris
Chris

Reputation: 999

Read (decode) and process an aac stream with python

I have an Axis camera that provides an audio stream that is aac encoded. I would like to find a possibility to decode that stream in Python to further process the raw audio data. Does anybody have suggestions how that could be done?

Thanks!

Upvotes: 4

Views: 6735

Answers (1)

Anil_M
Anil_M

Reputation: 11463

You can use pydub to convert an aac audio to datasegment and then process it further.

from pydub import AudioSegment
from pydub.playback import play

#convert audio to datasegment
sound = AudioSegment.from_file("your/path/to/audio.aiff", "aac") 
play(sound)  #play sound

Lots of other data manipulation using pydub is available here

Upvotes: 3

Related Questions