Skip to content

Commit

Permalink
Dubbing: Use gpt-4o and smaller ASR segment. v5.15.17
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jul 17, 2024
1 parent 94f5465 commit c1e316f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ The following are the update records for the Oryx server.
* Forward: Fix high CPU bug. v5.15.14
* Support Go PPROF for CPU profiling. [v5.15.15](https://github.com/ossrs/oryx/releases/tag/v5.15.15)
* VLive: Support download by youtube-dl. v5.15.16
* Dubbing: Use gpt-4o and smaller ASR segment. v5.15.17
* v5.14:
* Merge features and bugfix from releases. v5.14.1
* Dubbing: Support VoD dubbing for multiple languages. [v5.14.2](https://github.com/ossrs/oryx/releases/tag/v5.14.2)
Expand Down
2 changes: 1 addition & 1 deletion platform/dubbing.go
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ func (v *SrsDubbingTask) Start(ctx context.Context) error {

// Split the audio to segments, because each ASR is limited to 25MB by OpenAI,
// see https://platform.openai.com/docs/guides/speech-to-text
limitDuration := int(25*1024*1024*8/float64(bitrate)) / 5
limitDuration := int(25*1024*1024*8/float64(bitrate)) / 10
for starttime := float64(0); starttime < duration; starttime += float64(limitDuration) {
// For debugging, only the first segment.
if starttime > 0 && onlyRegenerateFirstSegment {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/ScenarioDubbing.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ function DubbingSettings({project, requesting, updateProject}) {

const [aiChatEnabled, setAiChatEnabled] = React.useState(project?.trans?.aiChatEnabled);
const [aiTransProvider, setAiTransProvider] = React.useState(project?.trans?.aiProvider || 'openai');
const [aiChatModel, setAiChatModel] = React.useState(project?.trans?.aiChatModel || 'gpt-4-turbo');
const [aiChatModel, setAiChatModel] = React.useState(project?.trans?.aiChatModel || 'gpt-4o');
const [aiChatPrompt, setAiChatPrompt] = React.useState(project?.trans?.aiChatPrompt || (aiAsrLanguage === 'en' ? 'Translate all user input text into Chinese.' : 'Translate all user input text into English.'));

const [aiRephraseEnabled, setAiRephraseEnabled] = React.useState(project?.rephrase?.aiChatEnabled);
const [aiRephraseProvider, setAiRephraseProvider] = React.useState(project?.rephrase?.aiProvider || 'openai');
const [aiRephraseModel, setAiRephraseModel] = React.useState(project?.rephrase?.aiChatModel || 'gpt-4-turbo');
const [aiRephraseModel, setAiRephraseModel] = React.useState(project?.rephrase?.aiChatModel || 'gpt-4o');
const [aiRephrasePrompt, setAiRephrasePrompt] = React.useState(project?.rephrase?.aiChatPrompt || 'Use the same language and do not translate. Remember to maintain original meanings. Rephrase the text shorter.');

const [aiTtsEnabled, setAiTtsEnabled] = React.useState(project?.tts?.aiTtsEnabled);
Expand Down

0 comments on commit c1e316f

Please sign in to comment.