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
ae7c0380
Unverified
Commit
ae7c0380
authored
Jul 27, 2023
by
zxhlyh
Committed by
GitHub
Jul 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat/application api add speech to text (#655)
parent
23e34136
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
template_chat.en.mdx
web/app/components/develop/template/template_chat.en.mdx
+42
-0
template_chat.zh.mdx
web/app/components/develop/template/template_chat.zh.mdx
+42
-0
No files found.
web/app/components/develop/template/template_chat.en.mdx
View file @
ae7c0380
...
@@ -380,6 +380,48 @@ For versatile conversational apps using a Q&A format, call the chat-messages API
...
@@ -380,6 +380,48 @@ For versatile conversational apps using a Q&A format, call the chat-messages API
</Col>
</Col>
</Row>
</Row>
---
<Heading
url='/audio-to-text'
method='POST'
title='speech to text'
name='#audio'
/>
<Row>
<Col>
Speech to text, only supports openai model.
### Request Body
<Properties>
<Property name='file' type='file' key='file'>
Audio file.
File uploads are currently limited to 15 MB and the following input file types are supported: mp3, mp4, mpeg, mpga, m4a, wav, and webm.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/audio-to-text" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/audio-to-text' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'file=@localfile;type=audio/[mp3|mp4|mpeg|mpga|m4a|wav|webm]'`}>
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--form 'file=@localfile;type=audio/mp3'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"text": ""
}
```
</CodeGroup>
</Col>
</Row>
---
---
...
...
web/app/components/develop/template/template_chat.zh.mdx
View file @
ae7c0380
...
@@ -379,6 +379,48 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
...
@@ -379,6 +379,48 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
</Col>
</Col>
</Row>
</Row>
---
<Heading
url='/audio-to-text'
method='POST'
title='语音转文字'
name='#audio'
/>
<Row>
<Col>
语音转文字,仅支持 openai 模型。
### Request Body
<Properties>
<Property name='file' type='file' key='file'>
语音文件。
文件上传当前限制为 15 MB,并且支持以下输入文件类型:mp3、mp4、mpeg、mpga、m4a、wav 和 webm。
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/audio-to-text" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/audio-to-text' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'file=@localfile;type=audio/[mp3|mp4|mpeg|mpga|m4a|wav|webm]`}>
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--form 'file=@localfile;type=audio/mp3'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"text": ""
}
```
</CodeGroup>
</Col>
</Row>
---
---
...
...
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