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

Function audio_prepare_single

generate_multitalk.py:348–356  ·  view source on GitHub ↗
(audio_path, sample_rate=16000)

Source from the content-addressed store, hash-verified

346 return human_speech_array
347
348def audio_prepare_single(audio_path, sample_rate=16000):
349 ext = os.path.splitext(audio_path)[1].lower()
350 if ext in ['.mp4', '.mov', '.avi', '.mkv']:
351 human_speech_array = extract_audio_from_video(audio_path, sample_rate)
352 return human_speech_array
353 else:
354 human_speech_array, sr = librosa.load(audio_path, sr=sample_rate)
355 human_speech_array = loudness_norm(human_speech_array, sr)
356 return human_speech_array
357
358def process_tts_single(text, save_dir, voice1):
359 s1_sentences = []

Callers 2

audio_prepare_multiFunction · 0.70
generateFunction · 0.70

Calls 2

extract_audio_from_videoFunction · 0.70
loudness_normFunction · 0.70

Tested by

no test coverage detected