small fixes

This commit is contained in:
itqop 2025-02-23 23:13:04 +03:00
parent 83595402b7
commit ac7596c183
2 changed files with 2 additions and 1 deletions

View File

@ -12,5 +12,5 @@ class WhisperTranscriber:
print("Whisper model loaded.")
def transcribe(self, audio_file: str) -> str:
result = self.pipe(audio_file, return_timestamps=True)
result = self.pipe(audio_file, batch_size=4, return_timestamps=True)
return result.get("text", "").strip()

View File

@ -50,6 +50,7 @@ async def handle_voice_and_video(message: types.Message, redis_service, storage_
chat_id=message.chat.id,
message_id=message.message_id
)
os.remove(wav_destination)
if text:
await send_long_message(message, text)
else: