Switch to double quotes and reformat codebase with Biome
This commit is contained in:
@@ -19,22 +19,20 @@ async function main(): Promise<void> {
|
||||
|
||||
const defaultOutPath = path.resolve(repoRoot, "tmp", "dictation-baseline.transcript.txt");
|
||||
const audioPath =
|
||||
process.env.DICTATION_AUDIO_PATH ??
|
||||
(process.argv[2] ? path.resolve(process.argv[2]) : null);
|
||||
process.env.DICTATION_AUDIO_PATH ?? (process.argv[2] ? path.resolve(process.argv[2]) : null);
|
||||
const outPath = path.resolve(process.env.DICTATION_OUT_PATH ?? process.argv[3] ?? defaultOutPath);
|
||||
|
||||
if (!audioPath) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(
|
||||
"Usage: npx tsx packages/server/scripts/dictation-generate-baseline.ts <audioPath> [outPath]\n" +
|
||||
" Or set DICTATION_AUDIO_PATH / DICTATION_OUT_PATH.\n"
|
||||
" Or set DICTATION_AUDIO_PATH / DICTATION_OUT_PATH.\n",
|
||||
);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const apiKey = requireEnv("OPENAI_API_KEY");
|
||||
const transcriptionModel =
|
||||
process.env.OPENAI_REALTIME_TRANSCRIPTION_MODEL ?? "gpt-4o-transcribe";
|
||||
const transcriptionModel = process.env.OPENAI_REALTIME_TRANSCRIPTION_MODEL ?? "gpt-4o-transcribe";
|
||||
const prompt =
|
||||
process.env.OPENAI_REALTIME_DICTATION_TRANSCRIPTION_PROMPT ??
|
||||
"Transcribe only what the speaker says. Do not add words. Preserve punctuation and casing. If the audio is silence or non-speech noise, return an empty transcript.";
|
||||
|
||||
Reference in New Issue
Block a user