Provided sound format makes difference. So which one is the best one? #150
Unanswered
FurkanGozukara
asked this question in
Q&A
Replies: 1 comment 7 replies
-
I think most appropriate format is pcm_s16le WAV mono. If you interesting, python code: data = input_audio_or_video
if type(data) == io.BytesIO:
data = data.getvalue()
cmd = ["ffmpeg"]
if time_start:
cmd.extend(["-ss", get_hms(time_start)])
if time_end and time_end > time_start:
cmd.extend(["-t", get_hms(time_end - time_start)])
cmd.extend(
[
"-i",
"-",
"-acodec",
"pcm_s16le",
"-ar",
"16000",
"-ac",
"1",
"pipe:.wav",
]
)
proc = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
bufsize=len(data),
shell=False,
)
out = proc.communicate(input=data, timeout=None)[0]
proc.wait()
converted_audio = io.BytesIO(out) |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have transcribed my newest with with directly providing the MKV file and the MP3 sound file extracted by FFMPEG
There are differences between 2 transcribe. In some cases MKV video file input better and in some cases provided MP3 file is better
So which format is best? Which approach is best?
Actually I find MP3 slightly better
Beta Was this translation helpful? Give feedback.
All reactions