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

相关推荐
dme.几秒前
Python爬虫基础文件操作
爬虫·python
Jet_closer_burning10 分钟前
Vue2 和 Vue3 的响应式原理对比
前端·javascript·vue.js·html
小白教程20 分钟前
Python连接MySQL数据库图文教程,Python连接数据库MySQL入门教程
数据库·python·mysql·python链接数据库·python链接mysql
weixin_3077791321 分钟前
PySpark实现GROUP BY WITH CUBE和WITH ROLLUP的分类汇总功能
大数据·开发语言·python·spark
xing251637 分钟前
pytest-html
前端·html·pytest
努力的白熊嗨1 小时前
一文带你搞懂前端大文件上传
前端·javascript
茂茂在长安1 小时前
Linux 命令大全完整版(11)
java·linux·运维·服务器·前端·centos
不太会写1 小时前
基于Python+django+mysql旅游数据爬虫采集可视化分析推荐系统
python·推荐算法
呱牛do it1 小时前
Python Matplotlib图形美化指南
开发语言·python·matplotlib
pianmian11 小时前
python制图之小提琴图
开发语言·python·信息可视化