bugfix
This commit is contained in:
parent
4029d35cf8
commit
b6c93d375d
@ -3,7 +3,7 @@ from appPublic.dictObject import DictObject
|
||||
from appPublic.oauth_client import OAuthClient
|
||||
|
||||
desc = {
|
||||
"path":"/asr/generate",
|
||||
"path":"/api/generate",
|
||||
"method":"POST",
|
||||
"headers":[
|
||||
{
|
||||
@ -39,13 +39,13 @@ async def asr(a_file):
|
||||
r = None
|
||||
with open(a_file, 'rb') as f:
|
||||
oc = OAuthClient(DictObject(**opts))
|
||||
r = await oc('https://sage.open-computing.cn', 'asr', {'audio_file':f})
|
||||
r = await oc('https://sage.open-computing.cn/asr', 'asr', {'audio_file':f})
|
||||
print(f'{r=}')
|
||||
return r
|
||||
|
||||
with open(a_file, 'rb') as f:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.post("https://sage.open-computing.cn/asr/generate", data={
|
||||
async with session.post("https://sage.open-computing.cn/asr/api/generate.dspy", data={
|
||||
"model":"whisper",
|
||||
"audio_file":f
|
||||
}) as response:
|
||||
|
Loading…
Reference in New Issue
Block a user