intermediate commit

This commit is contained in:
Freestyle-Play
2025-10-10 12:54:06 +03:00
parent 9272ce4123
commit bd01abff8b
3 changed files with 0 additions and 35 deletions

View File

@@ -5,25 +5,13 @@ from pathlib import Path
class GlueAudio():
def glue(self, audio_files: list, output_path: str, output_filename: str) -> Path:
"""
<<<<<<< HEAD
Склеивает аудиофайлы с помощью FFmpeg, используя промежуточный список файлов.
Этот метод чрезвычайно эффективен по памяти и скорости.
=======
Склеивает аудиофайлы РАЗНЫХ форматов с помощью FFmpeg и filter_complex.
Это универсальный и эффективный по памяти метод.
>>>>>>> 1e5105b7d658310c159c65ba318c08522506c3fb
Args:
audio_files (list): Список путей к исходным аудиофайлам.
output_path (str): Директория для сохранения итогового файла.
output_filename (str): Имя итогового склеенного файла.
<<<<<<< HEAD
Returns:
Path: Путь к созданному склеенному файлу.
"""
=======
Returns:
Path: Путь к созданному склеенному файлу.
@@ -71,4 +59,3 @@ class GlueAudio():
raise RuntimeError(f"Ошибка FFmpeg при склейке файлов: {e.stderr}")
return final_audio_path
>>>>>>> 1e5105b7d658310c159c65ba318c08522506c3fb

View File

@@ -12,23 +12,6 @@ class GradioHandlers:
self.llm_factory = llm_factory
def handleRecognizeBtn(
<<<<<<< HEAD
self,
audioFiles, model, device, compute_type, beamSize, vadFilter,
minSilenceDurationMs, speechPadMs, temp0, temp1, temp2, wordTimestamps,
noSpeechThreshold, conditionOnPreviousText, filename, outPath
):
try:
audioFile = self.ga.glue(audioFiles, output)
file = self.fh.saveFile(filename, audioFile, outPath)
return self.FasterWhisper.recognize(model, device, compute_type, file, beamSize, vadFilter, minSilenceDurationMs, speechPadMs, temp0, temp1, temp2, wordTimestamps, noSpeechThreshold, conditionOnPreviousText)
except (FileNotFoundError, RuntimeError) as e:
# Если FFmpeg не найден или произошла ошибка, сообщаем пользователю
gr.Warning(str(e))
return "" # Возвращаем пустую строку в текстовое поле
=======
self, audioFiles, model, device, compute_type, beamSize, vadFilter,
minSilenceDurationMs, speechPadMs, temp0, temp1, temp2,
wordTimestamps, noSpeechThreshold, conditionOnPreviousText, filename, outPath
@@ -46,7 +29,6 @@ class GradioHandlers:
# Передаем путь к склеенному файлу в FasterWhisper
return self.FasterWhisper.recognize(model, device, compute_type, str(glued_audio_path), beamSize, vadFilter, minSilenceDurationMs, speechPadMs, temp0, temp1, temp2, wordTimestamps, noSpeechThreshold, conditionOnPreviousText)
>>>>>>> 1e5105b7d658310c159c65ba318c08522506c3fb
# Функция улучшения текста
def generateByCondition(self, api_key, llm_provider,