File tree 3 files changed +175
-0
lines changed 3 files changed +175
-0
lines changed Original file line number Diff line number Diff line change @@ -774,6 +774,33 @@ const docTemplate = `{
774
774
}
775
775
}
776
776
}
777
+ },
778
+ "/vad": {
779
+ "post": {
780
+ "consumes": [
781
+ "application/json"
782
+ ],
783
+ "summary": "Detect voice fragments in an audio stream",
784
+ "parameters": [
785
+ {
786
+ "description": "query params",
787
+ "name": "request",
788
+ "in": "body",
789
+ "required": true,
790
+ "schema": {
791
+ "$ref": "#/definitions/schema.VADRequest"
792
+ }
793
+ }
794
+ ],
795
+ "responses": {
796
+ "200": {
797
+ "description": "Response",
798
+ "schema": {
799
+ "$ref": "#/definitions/proto.VADResponse"
800
+ }
801
+ }
802
+ }
803
+ }
777
804
}
778
805
},
779
806
"definitions": {
@@ -1207,6 +1234,28 @@ const docTemplate = `{
1207
1234
"StatusResponse_ERROR"
1208
1235
]
1209
1236
},
1237
+ "proto.VADResponse": {
1238
+ "type": "object",
1239
+ "properties": {
1240
+ "segments": {
1241
+ "type": "array",
1242
+ "items": {
1243
+ "$ref": "#/definitions/proto.VADSegment"
1244
+ }
1245
+ }
1246
+ }
1247
+ },
1248
+ "proto.VADSegment": {
1249
+ "type": "object",
1250
+ "properties": {
1251
+ "end": {
1252
+ "type": "number"
1253
+ },
1254
+ "start": {
1255
+ "type": "number"
1256
+ }
1257
+ }
1258
+ },
1210
1259
"schema.BackendMonitorRequest": {
1211
1260
"type": "object",
1212
1261
"properties": {
@@ -1806,6 +1855,23 @@ const docTemplate = `{
1806
1855
"type": "string"
1807
1856
}
1808
1857
}
1858
+ },
1859
+ "schema.VADRequest": {
1860
+ "description": "VAD request body",
1861
+ "type": "object",
1862
+ "properties": {
1863
+ "audio": {
1864
+ "description": "model name or full path",
1865
+ "type": "array",
1866
+ "items": {
1867
+ "type": "number"
1868
+ }
1869
+ },
1870
+ "model": {
1871
+ "description": "model name or full path",
1872
+ "type": "string"
1873
+ }
1874
+ }
1809
1875
}
1810
1876
},
1811
1877
"securityDefinitions": {
Original file line number Diff line number Diff line change 767
767
}
768
768
}
769
769
}
770
+ },
771
+ "/vad" : {
772
+ "post" : {
773
+ "consumes" : [
774
+ " application/json"
775
+ ],
776
+ "summary" : " Detect voice fragments in an audio stream" ,
777
+ "parameters" : [
778
+ {
779
+ "description" : " query params" ,
780
+ "name" : " request" ,
781
+ "in" : " body" ,
782
+ "required" : true ,
783
+ "schema" : {
784
+ "$ref" : " #/definitions/schema.VADRequest"
785
+ }
786
+ }
787
+ ],
788
+ "responses" : {
789
+ "200" : {
790
+ "description" : " Response" ,
791
+ "schema" : {
792
+ "$ref" : " #/definitions/proto.VADResponse"
793
+ }
794
+ }
795
+ }
796
+ }
770
797
}
771
798
},
772
799
"definitions" : {
1200
1227
" StatusResponse_ERROR"
1201
1228
]
1202
1229
},
1230
+ "proto.VADResponse" : {
1231
+ "type" : " object" ,
1232
+ "properties" : {
1233
+ "segments" : {
1234
+ "type" : " array" ,
1235
+ "items" : {
1236
+ "$ref" : " #/definitions/proto.VADSegment"
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "proto.VADSegment" : {
1242
+ "type" : " object" ,
1243
+ "properties" : {
1244
+ "end" : {
1245
+ "type" : " number"
1246
+ },
1247
+ "start" : {
1248
+ "type" : " number"
1249
+ }
1250
+ }
1251
+ },
1203
1252
"schema.BackendMonitorRequest" : {
1204
1253
"type" : " object" ,
1205
1254
"properties" : {
1799
1848
"type" : " string"
1800
1849
}
1801
1850
}
1851
+ },
1852
+ "schema.VADRequest" : {
1853
+ "description" : " VAD request body" ,
1854
+ "type" : " object" ,
1855
+ "properties" : {
1856
+ "audio" : {
1857
+ "description" : " model name or full path" ,
1858
+ "type" : " array" ,
1859
+ "items" : {
1860
+ "type" : " number"
1861
+ }
1862
+ },
1863
+ "model" : {
1864
+ "description" : " model name or full path" ,
1865
+ "type" : " string"
1866
+ }
1867
+ }
1802
1868
}
1803
1869
},
1804
1870
"securityDefinitions" : {
Original file line number Diff line number Diff line change @@ -295,6 +295,20 @@ definitions:
295
295
- StatusResponse_BUSY
296
296
- StatusResponse_READY
297
297
- StatusResponse_ERROR
298
+ proto.VADResponse :
299
+ properties :
300
+ segments :
301
+ items :
302
+ $ref : ' #/definitions/proto.VADSegment'
303
+ type : array
304
+ type : object
305
+ proto.VADSegment :
306
+ properties :
307
+ end :
308
+ type : number
309
+ start :
310
+ type : number
311
+ type : object
298
312
schema.BackendMonitorRequest :
299
313
properties :
300
314
model :
@@ -701,6 +715,18 @@ definitions:
701
715
type :
702
716
type : string
703
717
type : object
718
+ schema.VADRequest :
719
+ description : VAD request body
720
+ properties :
721
+ audio :
722
+ description : model name or full path
723
+ items :
724
+ type : number
725
+ type : array
726
+ model :
727
+ description : model name or full path
728
+ type : string
729
+ type : object
704
730
info :
705
731
contact :
706
732
name : LocalAI
@@ -1188,6 +1214,23 @@ paths:
1188
1214
schema :
1189
1215
$ref : ' #/definitions/schema.TokenizeResponse'
1190
1216
summary : Tokenize the input.
1217
+ /vad :
1218
+ post :
1219
+ consumes :
1220
+ - application/json
1221
+ parameters :
1222
+ - description : query params
1223
+ in : body
1224
+ name : request
1225
+ required : true
1226
+ schema :
1227
+ $ref : ' #/definitions/schema.VADRequest'
1228
+ responses :
1229
+ " 200 " :
1230
+ description : Response
1231
+ schema :
1232
+ $ref : ' #/definitions/proto.VADResponse'
1233
+ summary : Detect voice fragments in an audio stream
1191
1234
securityDefinitions :
1192
1235
BearerAuth :
1193
1236
in : header
You can’t perform that action at this time.
0 commit comments