diff --git a/telegram_bot/handlers/audio_handler.py b/telegram_bot/handlers/audio_handler.py index 774bf61..0d15825 100644 --- a/telegram_bot/handlers/audio_handler.py +++ b/telegram_bot/handlers/audio_handler.py @@ -27,11 +27,22 @@ async def handle_voice_and_video(message: types.Message, redis_service, storage_ await message.bot.download_file(file_path, temp_destination) + if not os.path.exists(temp_destination): + print(f"❌ Ошибка: Файл {temp_destination} не был загружен!") + else: + print(f"✅ Файл успешно загружен: {temp_destination}") + + wav_filename = f"{file_uuid}.wav" wav_destination = os.path.join(storage_path, wav_filename) convert_to_wav(temp_destination, wav_destination) + if not os.path.exists(wav_destination): + print(f"❌ Ошибка: WAV-файл {wav_destination} не был создан!") + else: + print(f"✅ WAV-файл успешно создан: {wav_destination}") + os.remove(temp_destination) task_data = {