MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / audio_prepare_single

Function audio_prepare_single

app.py:339–347  ·  view source on GitHub ↗
(audio_path, sample_rate=16000)

Source from the content-addressed store, hash-verified

337 return human_speech_array
338
339def audio_prepare_single(audio_path, sample_rate=16000):
340 ext = os.path.splitext(audio_path)[1].lower()
341 if ext in ['.mp4', '.mov', '.avi', '.mkv']:
342 human_speech_array = extract_audio_from_video(audio_path, sample_rate)
343 return human_speech_array
344 else:
345 human_speech_array, sr = librosa.load(audio_path, sr=sample_rate)
346 human_speech_array = loudness_norm(human_speech_array, sr)
347 return human_speech_array
348
349def process_tts_single(text, save_dir, voice1):
350 s1_sentences = []

Callers 2

audio_prepare_multiFunction · 0.70
generate_videoFunction · 0.70

Calls 2

extract_audio_from_videoFunction · 0.70
loudness_normFunction · 0.70

Tested by

no test coverage detected