-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathfunasr-openai-api.postman_collection.json
More file actions
185 lines (185 loc) · 5.09 KB
/
Copy pathfunasr-openai-api.postman_collection.json
File metadata and controls
185 lines (185 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
"info": {
"name": "FunASR OpenAI-Compatible API",
"description": "Smoke-test the FunASR OpenAI-compatible speech API. Start the server, set FUNASR_BASE_URL, choose a local audio file for multipart requests, then run health, model list, and transcription checks.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "FUNASR_BASE_URL",
"value": "http://localhost:8000",
"type": "string"
},
{
"key": "MODEL_ALIAS",
"value": "sensevoice",
"type": "string"
},
{
"key": "RESPONSE_FORMAT",
"value": "verbose_json",
"type": "string"
}
],
"item": [
{
"name": "Health check",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FUNASR_BASE_URL}}/health",
"host": [
"{{FUNASR_BASE_URL}}"
],
"path": [
"health"
]
},
"description": "Confirm the FunASR API server is reachable and ready."
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('health returns 200', function () { pm.response.to.have.status(200); });",
"pm.test('health response is JSON', function () { pm.response.to.be.json; });"
]
}
}
]
},
{
"name": "List model aliases",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FUNASR_BASE_URL}}/v1/models",
"host": [
"{{FUNASR_BASE_URL}}"
],
"path": [
"v1",
"models"
]
},
"description": "List OpenAI-compatible model aliases exposed by the server."
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('models returns 200', function () { pm.response.to.have.status(200); });",
"pm.test('models response is JSON', function () { pm.response.to.be.json; });"
]
}
}
]
},
{
"name": "Transcribe audio - verbose JSON",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "sample.wav",
"description": "Choose a local wav, mp3, m4a, or other supported audio file before sending."
},
{
"key": "model",
"value": "{{MODEL_ALIAS}}",
"type": "text"
},
{
"key": "response_format",
"value": "{{RESPONSE_FORMAT}}",
"type": "text"
}
]
},
"url": {
"raw": "{{FUNASR_BASE_URL}}/v1/audio/transcriptions",
"host": [
"{{FUNASR_BASE_URL}}"
],
"path": [
"v1",
"audio",
"transcriptions"
]
},
"description": "Upload an audio file with multipart/form-data and return transcript text plus segments when RESPONSE_FORMAT is verbose_json."
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('transcription returns 200', function () { pm.response.to.have.status(200); });",
"pm.test('transcription response is JSON', function () { pm.response.to.be.json; });",
"pm.test('transcription has text', function () { var data = pm.response.json(); pm.expect(data.text).to.be.a('string'); });"
]
}
}
]
},
{
"name": "Transcribe audio - text only",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "sample.wav",
"description": "Choose a local audio file before sending."
},
{
"key": "model",
"value": "{{MODEL_ALIAS}}",
"type": "text"
}
]
},
"url": {
"raw": "{{FUNASR_BASE_URL}}/v1/audio/transcriptions",
"host": [
"{{FUNASR_BASE_URL}}"
],
"path": [
"v1",
"audio",
"transcriptions"
]
},
"description": "Minimal OpenAI-compatible transcription request."
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('transcription returns 200', function () { pm.response.to.have.status(200); });",
"pm.test('transcription response is JSON', function () { pm.response.to.be.json; });"
]
}
}
]
}
]
}