File tree Expand file tree Collapse file tree 3 files changed +175
-0
lines changed Expand file tree Collapse file tree 3 files changed +175
-0
lines changed Original file line number Diff line number Diff line change @@ -774,6 +774,33 @@ const docTemplate = `{
774774 }
775775 }
776776 }
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+ }
777804 }
778805 },
779806 "definitions": {
@@ -1207,6 +1234,28 @@ const docTemplate = `{
12071234 "StatusResponse_ERROR"
12081235 ]
12091236 },
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+ },
12101259 "schema.BackendMonitorRequest": {
12111260 "type": "object",
12121261 "properties": {
@@ -1806,6 +1855,23 @@ const docTemplate = `{
18061855 "type": "string"
18071856 }
18081857 }
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+ }
18091875 }
18101876 },
18111877 "securityDefinitions": {
Original file line number Diff line number Diff line change 767767 }
768768 }
769769 }
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+ }
770797 }
771798 },
772799 "definitions" : {
12001227 " StatusResponse_ERROR"
12011228 ]
12021229 },
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+ },
12031252 "schema.BackendMonitorRequest" : {
12041253 "type" : " object" ,
12051254 "properties" : {
17991848 "type" : " string"
18001849 }
18011850 }
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+ }
18021868 }
18031869 },
18041870 "securityDefinitions" : {
Original file line number Diff line number Diff line change @@ -295,6 +295,20 @@ definitions:
295295 - StatusResponse_BUSY
296296 - StatusResponse_READY
297297 - 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
298312 schema.BackendMonitorRequest :
299313 properties :
300314 model :
@@ -701,6 +715,18 @@ definitions:
701715 type :
702716 type : string
703717 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
704730info :
705731 contact :
706732 name : LocalAI
@@ -1188,6 +1214,23 @@ paths:
11881214 schema :
11891215 $ref : ' #/definitions/schema.TokenizeResponse'
11901216 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
11911234securityDefinitions :
11921235 BearerAuth :
11931236 in : header
You can’t perform that action at this time.
0 commit comments