Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
207080ba
Unverified
Commit
207080ba
authored
Feb 20, 2024
by
zxhlyh
Committed by
GitHub
Feb 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: audio to text (#2493)
parent
48bacd01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
audio.py
api/controllers/console/app/audio.py
+0
-1
audio_service.py
api/services/audio_service.py
+1
-1
No files found.
api/controllers/console/app/audio.py
View file @
207080ba
...
...
@@ -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
...
...
api/services/audio_service.py
View file @
207080ba
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment