We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 604ecd8 commit 14baae9Copy full SHA for 14baae9
1 file changed
astrbot/core/provider/sources/stepfun_asr_source.py
@@ -1,3 +1,4 @@
1
+import asyncio
2
import base64
3
import json
4
import uuid
@@ -173,7 +174,8 @@ async def prepare_audio_input(
173
174
source_path = converted_path
175
audio_type = "wav"
176
- encoded_audio = base64.b64encode(source_path.read_bytes()).decode("utf-8")
177
+ raw_audio = await asyncio.to_thread(source_path.read_bytes)
178
+ encoded_audio = base64.b64encode(raw_audio).decode("utf-8")
179
return encoded_audio, build_audio_format(audio_type), cleanup_paths
180
181
0 commit comments