Skip to content

Commit e00be9b

Browse files
authored
Merge pull request #63 from fifteen42/fix/speech-default-filename-extension
fix(speech): use correct file extension for default output filename
2 parents 43fc9e2 + 439eb17 commit e00be9b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/commands/speech/synthesize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export default defineCommand({
5656
const model = (flags.model as string) || 'speech-2.8-hd';
5757
const voice = (flags.voice as string) || 'English_expressive_narrator';
5858
const ts = new Date().toISOString().slice(0, 19).replace(/[T:]/g, '-');
59-
const outPath = (flags.out as string | undefined) ?? `speech_${ts}.mp3`;
59+
const ext = (flags.format as string) || 'mp3';
60+
const outPath = (flags.out as string | undefined) ?? `speech_${ts}.${ext}`;
6061
const outFormat = 'hex';
6162
const format = detectOutputFormat(config.output);
6263

0 commit comments

Comments
 (0)