use axum::{
extract::Multipart,
http::StatusCode,
Json,
};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TranscriptionResult {
pub text: String,
pub salience: f32,
pub speaker: Option<String>,
pub speaker_confidence: Option<f32>,
pub emotion: Option<EmotionProfile>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EmotionProfile {
pub valence: f32,
pub arousal: f32,
pub stability: f32,
}
#[derive(Debug, Deserialize)]
pub struct SpeakRequest {
pub text: String,
#[serde(default = "default_voice")]
pub voice: String,
}
fn default_voice() -> String {
"aye".to_string()
}
#[derive(Debug, Deserialize)]
pub struct RegisterSpeakerRequest {
pub label: String,
}
pub async fn transcribe(
mut _multipart: Multipart,
) -> Result<Json<TranscriptionResult>, (StatusCode, String)> {
Err((
StatusCode::NOT_IMPLEMENTED,
"Voice transcription requires liquid-rust integration. \
See docs/plans/2025-11-11-realtime-collaborative-dashboard-design.md"
.to_string(),
))
}
pub async fn register_speaker(
mut _multipart: Multipart,
) -> Result<Json<serde_json::Value>, (StatusCode, String)> {
Err((
StatusCode::NOT_IMPLEMENTED,
"Speaker registration requires liquid-rust integration.".to_string(),
))
}
pub async fn speak(
Json(_req): Json<SpeakRequest>,
) -> Result<impl axum::response::IntoResponse, (StatusCode, String)> {
Err::<([(axum::http::header::HeaderName, &str); 1], Vec<u8>), _>((
StatusCode::NOT_IMPLEMENTED,
"TTS requires liquid-rust integration.".to_string(),
))
}