From 28f4a1be06e29bb3bbb3dbf4f9307308783450ab Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 13 Sep 2024 13:04:16 +0200 Subject: Text-to-speach API for alert sound generation --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 33718c1..940bb5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ #![doc = include_str!("../README.md")] +mod audio; mod config; mod db; mod errors; @@ -13,7 +14,7 @@ use crate::config::CONFIG; use async_graphql::{EmptySubscription, Schema}; use axum::{ http::{header, Method, Request}, - routing::post, + routing::{get, post}, Extension, Router, }; use tokio::net::TcpListener; @@ -45,6 +46,7 @@ async fn create_app() -> Router { .finish(); Router::new() + .route("/assets/sounds/:id", get(audio::show_file)) .route( "/graphql", post(graphql::routes::graphql_handler).layer(Extension(schema.clone())), -- cgit v1.2.3-18-g5258