diff options
| author | soryu <soryu@soryu.co> | 2025-12-20 15:36:04 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2025-12-23 14:47:18 +0000 |
| commit | 01088f4f1915e36a7d0d8d8756f62f8207a48911 (patch) | |
| tree | 8fdbba900f3f4bba32bae76e2e0378848a90cf93 /makima/src/server/openapi.rs | |
| parent | ab9166170043ba5e0ce974e5b7accf0939d686e3 (diff) | |
| download | soryu-01088f4f1915e36a7d0d8d8756f62f8207a48911.tar.gz soryu-01088f4f1915e36a7d0d8d8756f62f8207a48911.zip | |
Implement makima listen websockets server
Diffstat (limited to 'makima/src/server/openapi.rs')
| -rw-r--r-- | makima/src/server/openapi.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/makima/src/server/openapi.rs b/makima/src/server/openapi.rs new file mode 100644 index 0000000..363d348 --- /dev/null +++ b/makima/src/server/openapi.rs @@ -0,0 +1,34 @@ +//! OpenAPI documentation configuration using utoipa. + +use utoipa::OpenApi; + +use crate::server::handlers::{listen, tts}; +use crate::server::messages::{ApiError, AudioEncoding, StartMessage, StopMessage, TranscriptMessage}; + +#[derive(OpenApi)] +#[openapi( + info( + title = "Makima Audio API", + version = "1.0.0", + description = "Streaming audio APIs for speech-to-text and text-to-speech with voice cloning.", + license(name = "MIT"), + ), + paths( + listen::websocket_handler, + tts::synthesize_handler, + ), + components( + schemas( + ApiError, + AudioEncoding, + StartMessage, + StopMessage, + TranscriptMessage, + ) + ), + tags( + (name = "STT", description = "Speech-to-text streaming endpoints"), + (name = "TTS", description = "Text-to-speech synthesis endpoints"), + ) +)] +pub struct ApiDoc; |
