Skip to content

Commit

Permalink
✨ feat: CreateOpenaiAudioTranscriptionsOptions add <prompt> parmas to…
Browse files Browse the repository at this point in the history
… get better transcript result .ref:https://wulu.zone/posts/whisper-cn
  • Loading branch information
mrslimslim committed Dec 31, 2023
1 parent 26ab412 commit 91ba99b
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 91ba99b

Please sign in to comment.