mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix: 修复 Telegram 语音使用 Whisper API 报错 (#3884)
* Update whisper_api_source.py * chore: ruff format --------- Co-authored-by: Soulter <905617992@qq.com>
This commit is contained in:
@@ -72,6 +72,6 @@ class ProviderOpenAIWhisperAPI(STTProvider):
|
||||
|
||||
result = await self.client.audio.transcriptions.create(
|
||||
model=self.model_name,
|
||||
file=open(audio_url, "rb"),
|
||||
file=("audio.wav", open(audio_url, "rb")),
|
||||
)
|
||||
return result.text
|
||||
|
||||
Reference in New Issue
Block a user