mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
fix: audio to text (#2493)
This commit is contained in:
parent
48bacd01cc
commit
207080babc
|
@ -47,7 +47,6 @@ class ChatMessageAudioApi(Resource):
|
|||
tenant_id=app_model.tenant_id,
|
||||
file=file,
|
||||
end_user=None,
|
||||
promot=app_model.app_model_config.pre_prompt
|
||||
)
|
||||
|
||||
return response
|
||||
|
|
|
@ -20,7 +20,7 @@ ALLOWED_EXTENSIONS = ['mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm', 'amr']
|
|||
|
||||
class AudioService:
|
||||
@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:
|
||||
raise NoAudioUploadedServiceError()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user