feat(voice): transcribe Telegram voice notes with SpeechRecognition
Add a voice message handler that downloads OGG audio, converts it to WAV via pydub/ffmpeg, and transcribes it with Google Speech Recognition (pt-BR) before feeding the text into the normal message pipeline. Also extract shared text processing into process_text_message, guard against updates without a text attribute, switch the default AI provider to openrouter with deepseek-v4-flash, and document the ffmpeg system requirement in DEPLOY.md.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
class PydubException(Exception):
|
||||
"""
|
||||
Base class for any Pydub exception
|
||||
"""
|
||||
|
||||
|
||||
class TooManyMissingFrames(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidDuration(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidTag(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidID3TagVersion(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class CouldntDecodeError(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class CouldntEncodeError(PydubException):
|
||||
pass
|
||||
|
||||
|
||||
class MissingAudioParameter(PydubException):
|
||||
pass
|
||||
Reference in New Issue
Block a user