From b78a8477e6c7d9b21c46dffe4c8f21d6b2a0858a Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Thu, 26 Mar 2026 23:51:02 +0800 Subject: [PATCH] feat(server): enable tts, asr base --- apps/server/src/routes/v1completions.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/server/src/routes/v1completions.ts b/apps/server/src/routes/v1completions.ts index e6192c72b..7eb6e3a7c 100644 --- a/apps/server/src/routes/v1completions.ts +++ b/apps/server/src/routes/v1completions.ts @@ -1,5 +1,3 @@ -/* eslint-disable unused-imports/no-unused-vars */ - import type { Context } from 'hono' import type { LlmMetrics } from '../libs/otel' @@ -13,6 +11,7 @@ import type { HonoEnv } from '../types/hono' import { useLogger } from '@guiiai/logg' import { context, SpanStatusCode, trace } from '@opentelemetry/api' import { Hono } from 'hono' +import { bodyLimit } from 'hono/body-limit' import { authGuard } from '../middlewares/auth' import { configGuard } from '../middlewares/config-guard' @@ -369,6 +368,6 @@ export function createV1CompletionsRoutes(fluxService: FluxService, billingServi .use('*', authGuard) .post('/chat/completions', completionsRateLimit, chatGuard, handleCompletion) .post('/chat/completion', completionsRateLimit, chatGuard, handleCompletion) - // .post('/audio/speech', ttsGuard, handleTTS) - // .post('/audio/transcriptions', bodyLimit({ maxSize: 25 * 1024 * 1024 }), asrGuard, handleTranscription) + .post('/audio/speech', ttsGuard, handleTTS) + .post('/audio/transcriptions', bodyLimit({ maxSize: 25 * 1024 * 1024 }), asrGuard, handleTranscription) }