Update lyrics.ts

This commit is contained in:
2025-11-25 03:53:25 +08:00
parent d8b1ec0456
commit a6bb5e37fd
+2 -1
View File
@@ -1,9 +1,10 @@
import { OpenRouter } from '@openrouter/sdk'
import type { LyricLine, LyricSegment } from '../../types'
import { isKana, isKanji } from 'wanakana'
import { building } from '$app/environment'
// Please put OPENROUTER_API_KEY in your environment variables.
if (!process.env.OPENROUTER_API_KEY) console.warn('Please set OPENROUTER_API_KEY in your environment variables.')
if (!building && !process.env.OPENROUTER_API_KEY) throw new Error('Please set OPENROUTER_API_KEY in your environment variables.')
const client = new OpenRouter({
apiKey: process.env.OPENROUTER_API_KEY ?? ""
})