Unverified Commit 207080ba authored by zxhlyh's avatar zxhlyh Committed by GitHub

fix: audio to text (#2493)

parent 48bacd01
...@@ -47,7 +47,6 @@ class ChatMessageAudioApi(Resource): ...@@ -47,7 +47,6 @@ class ChatMessageAudioApi(Resource):
tenant_id=app_model.tenant_id, tenant_id=app_model.tenant_id,
file=file, file=file,
end_user=None, end_user=None,
promot=app_model.app_model_config.pre_prompt
) )
return response return response
......
...@@ -20,7 +20,7 @@ ALLOWED_EXTENSIONS = ['mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm', 'amr'] ...@@ -20,7 +20,7 @@ ALLOWED_EXTENSIONS = ['mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm', 'amr']
class AudioService: class AudioService:
@classmethod @classmethod
def transcript_asr(cls, tenant_id: str, file: FileStorage, promot: str, end_user: Optional[str] = None): def transcript_asr(cls, tenant_id: str, file: FileStorage, end_user: Optional[str] = None):
if file is None: if file is None:
raise NoAudioUploadedServiceError() raise NoAudioUploadedServiceError()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment