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

相关推荐
中国lanwp7 分钟前
npm中@your-company:registry 和 registry 的区别
前端·npm·node.js
MrSYJ7 分钟前
可以指定 Jupyter Notebook 使用的虚拟环境吗
python·llm·agent
Bacon9 分钟前
Electron 应用商店:开箱即用工具集成方案
前端·github
行走的陀螺仪10 分钟前
uni-app + Vue3 实现折叠文本(超出省略 + 展开收起)
前端·javascript·css·uni-app·vue3
冴羽13 分钟前
JavaScript 异步循环踩坑指南
前端·javascript·node.js
jump68014 分钟前
commonjs 和 ES Module
前端
quant_198622 分钟前
【教程】使用加密货币行情接口 - 查询比特币实时价格
开发语言·后端·python·websocket·网络协议
ytttr87323 分钟前
MATLAB实现经验模态分解(EMD)与希尔伯特变换获取能量谱
人工智能·python·matlab
yumgpkpm27 分钟前
Doris在CMP7(类Cloudera CDP 7 404版华为Kunpeng)启用 Kerberos部署Doris
大数据·hive·hadoop·python·oracle·flink·cloudera
熊猫_豆豆29 分钟前
Python 写一个标准版和程序员版计算器
开发语言·python·计算器