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 小时前
从零开发一个 Coding Agent(四):使用状态机校验大模型事件流
前端·人工智能·后端
Csvn7 小时前
🧩 ESM vs CJS 混用的 7 个「天坑」——从 TypeScript 编译到 Node 与浏览器
前端
Csvn7 小时前
🎯 Web 性能 API 集合:Performance Observer 的 5 个冷门妙用
前端
Csvn7 小时前
深入 React 闭包陷阱:从根源上理解并根治 stale closure
前端
whyfail8 小时前
前端学 Spring Boot(8):接口为什么越用越慢?
前端·spring boot·后端
_Jimmy_8 小时前
Agent 溯源精度提升方案
人工智能·python·langchain
用户059540174468 小时前
LangChain 记忆测试踩坑实录:这两个坑让我排查了 4 小时
前端·css
程序员黑豆8 小时前
鸿蒙应用开发:@Monitor 装饰器使用教程
前端·harmonyos
SamChan909 小时前
在Web应用中集成PDF多语言翻译功能:PDFTranslator API实战指南
前端·python·ai·pdf·yapi·机器翻译
天天进步20159 小时前
Python全栈项目--智能办公自动化系统
开发语言·python