asr
curl --request POST \
--url https://api.maxapi.ai/fish/v1/asr \
--header 'Authorization: <authorization>' \
--header 'Content-Type: multipart/form-data' \
--header 'model: <model>' \
--form audio='@example-file'import requests
url = "https://api.maxapi.ai/fish/v1/asr"
files = { "audio": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "<authorization>",
"model": "<model>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio', 'speech-1.5');
const options = {method: 'POST', headers: {Authorization: '<authorization>', model: '<model>'}};
options.body = form;
fetch('https://api.maxapi.ai/fish/v1/asr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/fish/v1/asr"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nspeech-1.5\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("model", "<model>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/fish/v1/asr")
.header("Authorization", "<authorization>")
.header("model", "<model>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nspeech-1.5\r\n-----011000010111000001101001--")
.asString();{
"text": "<string>",
"duration": 123,
"segments": [
{
"text": "<string>",
"start": 123,
"end": 123
}
]
}POST
https://api.maxapi.ai
/
fish
/
v1
/
asr
asr
curl --request POST \
--url https://api.maxapi.ai/fish/v1/asr \
--header 'Authorization: <authorization>' \
--header 'Content-Type: multipart/form-data' \
--header 'model: <model>' \
--form audio='@example-file'import requests
url = "https://api.maxapi.ai/fish/v1/asr"
files = { "audio": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "<authorization>",
"model": "<model>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio', 'speech-1.5');
const options = {method: 'POST', headers: {Authorization: '<authorization>', model: '<model>'}};
options.body = form;
fetch('https://api.maxapi.ai/fish/v1/asr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/fish/v1/asr"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nspeech-1.5\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("model", "<model>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/fish/v1/asr")
.header("Authorization", "<authorization>")
.header("model", "<model>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nspeech-1.5\r\n-----011000010111000001101001--")
.asString();{
"text": "<string>",
"duration": 123,
"segments": [
{
"text": "<string>",
"start": 123,
"end": 123
}
]
}请求体
multipart/form-data