{ "openapi": "3.1.0", "info": { "title": "Automatic Speech Recognition API", "description": "This API provides endpoints for automatic speech recognition (ASR) operations.", "version": "1.0.0", "contact": { "name": "ASR Team", "email": "asr-team@example.com" } }, "servers": [ { "url": "https://asr.snr.audio/", "description": "Production Server" } ], "paths": { "/v1/rest/transcribelive": { "post": { "summary": "Transcribe Live Audio", "description": "Transcribes live audio input in real-time.", "operationId": "transcribe_live_audio", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/LiveAudioRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Transcription Successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResult" }, "example": { "text": "This is the transcribed text." } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Invalid audio format." } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Unauthorized access." } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } } }, "security": [ { "KeyBearer": [] } ] } }, "/v1/rest/transcribe": { "post": { "summary": "Transcribe Audio File", "description": "Transcribes audio file.", "operationId": "transcribe_audio_file", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/AudioFileRequestBody" } } }, "required": true }, "responses": { "200": { "description": "Transcription Successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResult" }, "example": { "text": "This is the transcribed text." } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Invalid audio format." } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Unauthorized access." } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } } }, "security": [ { "KeyBearer": [] } ] } } }, "components": { "schemas": { "LiveAudioRequestBody": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Live audio file to be transcribed." } }, "required": ["file"] }, "AudioFileRequestBody": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Audio file to be transcribed." } }, "required": ["file"] }, "TranscriptionResult": { "type": "object", "properties": { "text": { "type": "string", "description": "Transcribed text." } } }, "Error": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message." } } }, "ValidationError": { "type": "object", "properties": { "detail": { "type": "array", "items": { "$ref": "#/components/schemas/ValidationErrorItem" } } } }, "ValidationErrorItem": { "type": "object", "properties": { "loc": { "type": "array", "items": { "type": "string" } }, "msg": { "type": "string" } } } }, "securitySchemes": { "KeyBearer": { "type": "http", "scheme": "bearer" } } } }