Skip to content

Commit

Permalink
Merge pull request #24 from mrslimslim/mrslimslim/stt-prompt
Browse files Browse the repository at this point in the history
✨ feat: CreateOpenaiAudioTranscriptionsOptions add <prompt> parmas to get better transcript result
  • Loading branch information
canisminor1990 authored Jan 5, 2024
2 parents cbc7bd4 + 91ba99b commit 921fa55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/OpenAISTT/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface OpenAISTTPayload {
* @title 语音识别的模型名称
*/
model: string;
/**
* @title 语音识别的prmopt 以更好的获得whisper的解析效果
*/
prompt?: string;
};
/**
* @title 语音识别的文件
Expand Down
1 change: 1 addition & 0 deletions src/server/createOpenaiAudioTranscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const createOpenaiAudioTranscriptions = async ({
{
file,
model: options.model,
prompt: options.prompt || '',
},
{ headers: { Accept: '*/*' } },
);
Expand Down

0 comments on commit 921fa55

Please sign in to comment.