whisper get_writer srt_writer 参数说明

python 复制代码
lang="en"
constVideo = VideoConst("GV9AMT")
combineMp3Path = constVideo.getCombineMp3Path(lang)
srtPath = constVideo.getOutSrtAsrFixPath(lang=lang)
result, json_object = utilTts.whisper_transcribe_en(combineMp3Path)
srt_writer = get_writer("srt", constVideo.videoDir)
srt_writer(result, srtPath)

max_line_width

the maximum number of characters in a line before breaking the line

换行前一行中的最大字符数

max_line_count

the maximum number of lines in a segment

分段中的最大行数

highlight_words

underline each word as it is spoken in srt and vtt

在srt和vtt中说出的每个单词下面加下划线

max_words_per_line

no effect with --max_line_width) the maximum number of words in a segment

--max_line_width 有值是,max_words_per_line无效。 行中的最大单词数

参考:

How to Customize Subtitles with Whisper - CodePull

https://github.com/openai/whisper

相关推荐
timeguys12 分钟前
【前端】[vue3] [uni-app]使用 vantUI 框架
前端·uni-app
岁岁岁平安22 分钟前
Vue3学习(组合式API——Watch侦听器、watchEffect()详解)
前端·javascript·vue.js·学习·watch侦听器·组合式api
python15622 分钟前
使用Langfuse和RAGAS,搭建高可靠RAG应用
人工智能·windows·python
秋野酱28 分钟前
python项目参考文献
开发语言·python
uwvwko44 分钟前
BUUCTF——web刷题第一页题解
android·前端·数据库·php·web·ctf
CodeBlossom1 小时前
java加强 -stream流
java·windows·python
(・Д・)ノ1 小时前
python打卡day28
开发语言·python
有事没事实验室1 小时前
CSS 浮动与定位以及定位中z-index的堆叠问题
前端·css·开源
保利九里1 小时前
java中的方法详解
java·开发语言·python
Y3174291 小时前
Python Day25 学习
python·学习