修改了README
This commit is contained in:
@@ -146,12 +146,15 @@ bash run_service.sh
|
|||||||
|
|
||||||
## 3.5. 调用方法
|
## 3.5. 调用方法
|
||||||
|
|
||||||
你可以使用类型下面python代码的方式调用该接口:
|
你可以使用类似下面 python 代码的方式调用该接口:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
def test_process_audio(api_url, audio_file_path, language):
|
def test_process_audio(api_url, audio_file_path, language):
|
||||||
|
# api_url (str):部署服务 API 的 URL
|
||||||
|
# audio_file_path (str):本地的提问音频文件地址
|
||||||
|
# language (str):支持 chinese 和 english
|
||||||
url = f"{api_url}/process_audio"
|
url = f"{api_url}/process_audio"
|
||||||
files = {'audio': open(audio_file_path, 'rb')}
|
files = {'audio': open(audio_file_path, 'rb')}
|
||||||
data = {'language': language}
|
data = {'language': language}
|
||||||
|
|||||||
Reference in New Issue
Block a user