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

相关推荐
智研数智工坊7 小时前
FastAPI+uv+Jinja2+Nuitka 通用Web桌面框架搭建教程|从零搭建可打包迭代的Python开发底座
python·fastapi·uv·nuitka·jinja2·桌面应用开发
Ulyanov8 小时前
用声明式语法重新定义Python桌面UI:QML+PySide6现代开发入门(一)
开发语言·python·算法·ui·系统仿真·雷达电子对抗仿真
欧雷殿8 小时前
从「吸引子引导工程」看我的「一人公司」实践
前端·人工智能·后端
wordbaby8 小时前
React Native + RNOH:一个 `lazyScreen()` 搞定 48 页面启动懒加载
前端·react native
❀搜不到8 小时前
Ubuntu查看指定Python程序的CPU、GPU、内存占用情况
linux·python·ubuntu
竹林8188 小时前
用 wagmi v2 踩坑两天,我终于搞懂了多链钱包切换
前端·javascript
卷无止境8 小时前
用一个机器车间,研究SimPy核心概念
python
吃乔巴的糖8 小时前
Vue 3 打印模板设计器 (print-canvas-designer)
前端·vue.js