Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
457 lines
9.8 KiB
JSON
457 lines
9.8 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/spr/audio/{taskID}": {
|
|
"parameters": [
|
|
{
|
|
"name": "taskID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_audio_stt",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/delete/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "delete_model_delete",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/export/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_model_export",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/hostname": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_hostname_class",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/import/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "post_model_import",
|
|
"parameters": [
|
|
{
|
|
"name": "zip-model",
|
|
"in": "formData",
|
|
"type": "file",
|
|
"required": true,
|
|
"description": "prepared model zip file"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/models": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"$ref": "#/definitions/modelList"
|
|
}
|
|
}
|
|
},
|
|
"operationId": "get_model_list",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/queue": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_queue_stt",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/queue/{taskID}": {
|
|
"parameters": [
|
|
{
|
|
"name": "taskID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": { "type": "integer" },
|
|
"message": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "TaskNotFound"
|
|
}
|
|
},
|
|
"operationId": "delete_queue_del_stt",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/result/{taskID}": {
|
|
"parameters": [
|
|
{
|
|
"name": "taskID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"get": {
|
|
"responses": {
|
|
"404": {
|
|
"description": "Not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/error"
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"$ref": "#/definitions/resultTTS"
|
|
}
|
|
}
|
|
},
|
|
"operationId": "get_result_stt",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/stt/{id}": {
|
|
"post": {
|
|
"responses": {
|
|
"405": {
|
|
"description": "Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/error"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/error"
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"$ref": "#/definitions/modelTTS"
|
|
}
|
|
}
|
|
},
|
|
"operationId": "post_model_test",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "NN Model ID"
|
|
},
|
|
{
|
|
"name": "wav",
|
|
"in": "formData",
|
|
"type": "file",
|
|
"description": "file to recognize"
|
|
},
|
|
{
|
|
"name": "async",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "async mode (default 1: enqueue to cache/waiting; 0: sync text response)",
|
|
"default": 1,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "speakers",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "find speakers",
|
|
"default": 0,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "speaker_counter",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "number of speakers. 0 for autodetect. -1 disable speaker detection.",
|
|
"default": 0
|
|
},
|
|
{
|
|
"name": "normalization",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "normalize text",
|
|
"default": 1,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "punctuation",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "punctuate text",
|
|
"default": 1,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "toxicity",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "toxicity analyzer",
|
|
"default": 1,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "emotion",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "emotion analyzer",
|
|
"default": 0,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "voice_analyzer",
|
|
"in": "query",
|
|
"type": "integer",
|
|
"description": "voice analyzer",
|
|
"default": 1,
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"name": "vad",
|
|
"in": "query",
|
|
"type": "string",
|
|
"description": "VAD type",
|
|
"default": "webrtc",
|
|
"enum": [
|
|
"webrtc"
|
|
]
|
|
},
|
|
{
|
|
"name": "classifiers",
|
|
"in": "query",
|
|
"type": "string",
|
|
"description": "JSON with classification models to process each sentence"
|
|
},
|
|
{
|
|
"name": "webhook",
|
|
"in": "query",
|
|
"type": "string",
|
|
"description": "webhook url to send stt async result"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
},
|
|
"/spr/waveform/{taskID}": {
|
|
"parameters": [
|
|
{
|
|
"name": "taskID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_audioarray_stt",
|
|
"tags": [
|
|
"spr"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"title": "go-whisper-api",
|
|
"version": "5.008 release",
|
|
"description": "Whisper speech-to-text API (SPR-compatible)"
|
|
},
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "spr",
|
|
"description": "NN Model operations"
|
|
}
|
|
],
|
|
"definitions": {
|
|
"modelList": {
|
|
"properties": {
|
|
"models": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"description": "NN Model ID"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"error": {
|
|
"properties": {
|
|
"error": {
|
|
"type": "integer",
|
|
"description": "Error flag"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Error description"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"modelTTS": {
|
|
"required": [
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Recognized text"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"resultTTS": {
|
|
"properties": {
|
|
"model": { "type": "string" },
|
|
"text": { "type": "string" },
|
|
"words": { "type": "array" },
|
|
"toxicity": { "type": "object" },
|
|
"emotion": { "type": "object" },
|
|
"voice_analysis": { "type": "object" },
|
|
"status": { "type": "string" },
|
|
"taskID": { "type": "string" },
|
|
"created": { "type": "string" },
|
|
"processed": { "type": "string" }
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"responses": {
|
|
"ParseError": {
|
|
"description": "When a mask can't be parsed"
|
|
},
|
|
"MaskError": {
|
|
"description": "When any error occurs on mask"
|
|
}
|
|
}
|
|
} |