0

I'm trying to learn how to transcribe an audio recording, but I'm not getting very far, pydub won't even accept my recorded data:

from pydub import AudioSegment

m4a_file = '{path_to_m4a}/test.m4a'

sound = AudioSegment.from_wav(m4a_file)

This leads to the error:

Invalid data found when processing input

I made the recording using voice memo on my mac. I don't think it can be corrupted, I've run into the same problem using quicktime to make a recording.

Can anyone point out where I'm going wrong?

pydub==0.25.1

goose
  • 2,502
  • 6
  • 42
  • 69

1 Answers1

0

I faced the same problem. I've solved it by changing:

sound = AudioSegment.from_wav('path/to/file')

to:

sound = AudioSegment.from_file('path/to/file')
Egor-oop
  • 11
  • 2