Files
faster-whisper-n-ionet-llm/handlers/glueAudio.py
2025-10-08 16:07:30 +03:00

18 lines
860 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from pydub import AudioSegment
class GlueAudio():
def glue(self, audio_files: list, output_path: str, output_filename: str) -> Path:
"""
Склеивает аудиофайлы с помощью FFmpeg, используя промежуточный список файлов.
Этот метод чрезвычайно эффективен по памяти и скорости.
Args:
audio_files (list): Список путей к исходным аудиофайлам.
output_path (str): Директория для сохранения итогового файла.
output_filename (str): Имя итогового склеенного файла.
Returns:
Path: Путь к созданному склеенному файлу.
"""