diff --git a/package.json b/package.json index 8c7d387..4758f69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hailuo-free-api", - "version": "0.0.9", + "version": "0.0.10", "description": "HailuoAI Free API Server", "type": "module", "main": "dist/index.js", diff --git a/src/api/routes/audio.ts b/src/api/routes/audio.ts index fd1ed17..a8cb156 100644 --- a/src/api/routes/audio.ts +++ b/src/api/routes/audio.ts @@ -8,7 +8,7 @@ import environment from "@/lib/environment.ts"; import core from "../controllers/core.ts"; import logger from "@/lib/logger.ts"; -const REPLACE_AUDIO_MODEL_ENV = environment.envVars['REPLACE_AUDIO_MODEL'].split(",").map((v) => v.trim()); +const REPLACE_AUDIO_MODEL_ENV = (environment.envVars['REPLACE_AUDIO_MODEL'] || '').split(",").map((v) => v.trim()); const VOICE_TO_MODEL_INDEX = Object.keys(modelMap["tts-1"]).reduce( (obj, key, i) => { obj[key] = i;