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

相关推荐
我一定会有钱4 分钟前
pytest基础
python·测试工具·测试用例·pytest
玖笙&10 分钟前
✨万字解析解析:Vue.js优雅封装级联选择器组件(附源码)
前端·javascript·vue.js·前端框架
烟袅11 分钟前
深入理解 React 中 useState 与 useEffect
前端·javascript·react.js
行走的陀螺仪19 分钟前
前端基建从0到1搭建步骤清单(含工具选型+配置要点+落地注意事项)
前端·javascript·typescript·设计规范·前端工程化·规范化·前端基建
Hi~晴天大圣21 分钟前
if 变量和if not 变量用法之布尔真假值规则
python·if
老歌老听老掉牙22 分钟前
Vericut 5轴机床MCH文件解析与构建指南
xml·python·vericut
小白阿龙25 分钟前
脚手架启动失败(Vue CLI/Vite/Create React App)
前端·vue.js·react.js
鞋尖的灰尘28 分钟前
sdkman安装使用
前端
Aniugel34 分钟前
Vue国际化实现多语言方案
前端·vue.js·面试