Files
Scriberr/docs/docs.go
rishikanthc 96aeaf1454 basic UI
2025-08-21 15:48:55 -07:00

636 lines
20 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/v1/admin/queue/stats": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get current queue statistics",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get queue statistics",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/v1/auth/login": {
"post": {
"description": "Authenticate user and return JWT token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login",
"parameters": [
{
"description": "User credentials",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.LoginRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.LoginResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/transcription/list": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a list of all transcription jobs",
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "List all transcription records",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/v1/transcription/models": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get list of supported WhisperX models",
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "Get supported models",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/v1/transcription/submit": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Submit an audio file for transcription with WhisperX",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "Submit a transcription job",
"parameters": [
{
"type": "file",
"description": "Audio file",
"name": "audio",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Job title",
"name": "title",
"in": "formData"
},
{
"type": "boolean",
"description": "Enable speaker diarization",
"name": "diarization",
"in": "formData"
},
{
"type": "string",
"default": "base",
"description": "Whisper model",
"name": "model",
"in": "formData"
},
{
"type": "string",
"description": "Language code",
"name": "language",
"in": "formData"
},
{
"type": "integer",
"default": 16,
"description": "Batch size",
"name": "batch_size",
"in": "formData"
},
{
"type": "string",
"default": "float16",
"description": "Compute type",
"name": "compute_type",
"in": "formData"
},
{
"type": "string",
"default": "auto",
"description": "Device",
"name": "device",
"in": "formData"
},
{
"type": "boolean",
"description": "Enable VAD filter",
"name": "vad_filter",
"in": "formData"
},
{
"type": "number",
"default": 0.5,
"description": "VAD onset",
"name": "vad_onset",
"in": "formData"
},
{
"type": "number",
"default": 0.363,
"description": "VAD offset",
"name": "vad_offset",
"in": "formData"
},
{
"type": "integer",
"description": "Minimum speakers for diarization",
"name": "min_speakers",
"in": "formData"
},
{
"type": "integer",
"description": "Maximum speakers for diarization",
"name": "max_speakers",
"in": "formData"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.TranscriptionJob"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/transcription/{id}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get a specific transcription record by its ID",
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "Get transcription record by ID",
"parameters": [
{
"type": "string",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.TranscriptionJob"
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/transcription/{id}/status": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get the current status of a transcription job",
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "Get job status",
"parameters": [
{
"type": "string",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.TranscriptionJob"
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/transcription/{id}/transcript": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get the transcript for a completed transcription job",
"produces": [
"application/json"
],
"tags": [
"transcription"
],
"summary": "Get transcript",
"parameters": [
{
"type": "string",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/health": {
"get": {
"description": "Check if the API is healthy",
"produces": [
"application/json"
],
"tags": [
"health"
],
"summary": "Health check",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
"api.LoginRequest": {
"type": "object",
"required": [
"password",
"username"
],
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"api.LoginResponse": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"username": {
"type": "string"
}
}
}
}
},
"models.JobStatus": {
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"x-enum-varnames": [
"StatusPending",
"StatusProcessing",
"StatusCompleted",
"StatusFailed"
]
},
"models.TranscriptionJob": {
"type": "object",
"properties": {
"audio_path": {
"type": "string"
},
"created_at": {
"type": "string"
},
"diarization": {
"type": "boolean"
},
"error_message": {
"type": "string"
},
"id": {
"type": "string"
},
"parameters": {
"description": "WhisperX parameters",
"allOf": [
{
"$ref": "#/definitions/models.WhisperXParams"
}
]
},
"status": {
"$ref": "#/definitions/models.JobStatus"
},
"summary": {
"type": "string"
},
"title": {
"type": "string"
},
"transcript": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"models.WhisperXParams": {
"type": "object",
"properties": {
"batch_size": {
"type": "integer"
},
"compute_type": {
"type": "string"
},
"device": {
"type": "string"
},
"language": {
"type": "string"
},
"max_speakers": {
"type": "integer"
},
"min_speakers": {
"type": "integer"
},
"model": {
"type": "string"
},
"vad_filter": {
"type": "boolean"
},
"vad_offset": {
"type": "number"
},
"vad_onset": {
"type": "number"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "X-API-Key",
"in": "header"
},
"BearerAuth": {
"description": "JWT token with Bearer prefix",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{},
Title: "Scriberr API",
Description: "Audio transcription service using WhisperX",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}