Skip to content

Commit 921fa55

Browse files
Merge pull request #24 from mrslimslim/mrslimslim/stt-prompt
✨ feat: CreateOpenaiAudioTranscriptionsOptions add <prompt> parmas to get better transcript result
2 parents cbc7bd4 + 91ba99b commit 921fa55

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/core/OpenAISTT/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export interface OpenAISTTPayload {
1313
* @title 语音识别的模型名称
1414
*/
1515
model: string;
16+
/**
17+
* @title 语音识别的prmopt 以更好的获得whisper的解析效果
18+
*/
19+
prompt?: string;
1620
};
1721
/**
1822
* @title 语音识别的文件

src/server/createOpenaiAudioTranscriptions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const createOpenaiAudioTranscriptions = async ({
2121
{
2222
file,
2323
model: options.model,
24+
prompt: options.prompt || '',
2425
},
2526
{ headers: { Accept: '*/*' } },
2627
);

0 commit comments

Comments
 (0)