yesy
This commit is contained in:
parent
e45f23f75f
commit
72b06e0e4d
|
@ -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)
|
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_filename = f"{file_uuid}.wav"
|
||||||
wav_destination = os.path.join(storage_path, wav_filename)
|
wav_destination = os.path.join(storage_path, wav_filename)
|
||||||
|
|
||||||
convert_to_wav(temp_destination, wav_destination)
|
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)
|
os.remove(temp_destination)
|
||||||
|
|
||||||
task_data = {
|
task_data = {
|
||||||
|
|
Loading…
Reference in New Issue