Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

How to get sentence-level timestamps?

未关闭
#54 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
shell

调研方向

先从 parakeet-cli transcribe 命令及其 JSON 输出开始,然后检查单词时间戳是如何提供的。将所请求的句子级字幕行为与链接的 make_subtitles.py 脚本进行比较,并确定这项功能应属于 CLI,还是应作为本地配套工具实现。完成的标准应是:有一种文档完备且保护隐私的方式来生成传统的句子级字幕。

由索引模型根据 Issue 内容生成。

描述

parakeet output is word-level timestamped, but is friendly/traditional to make a subtitle for a video/audio transcription. Is possible to get sentence-level output? There is a local tool that can do it?

I was able to get word-level transcription with:

parakeet-cli transcribe --model tdt-0.6b-v3-q4_k.gguf --input in.wav --json > out.json

And with this shell script I was able to convert to WebVTT subtitle:

#!/bin/sh
jq -r '
  def format_time:
    . as $s |
    ($s / 3600 | floor) as $h |
    (($s % 3600) / 60 | floor) as $m |
    ($s % 60 | floor) as $sec |
    ($s * 1000 | floor % 1000) as $ms |
    "\(if $h < 10 then "0" else "" end)\($h):\(if $m < 10 then "0" else "" end)\($m):\(if $sec < 10 then "0" else "" end)\($sec).\(if $ms < 10 then "00" elif $ms < 100 then "0" else "" end)\($ms)";

  "WEBVTT\n\n" + ([.words[] | "\(.start | format_time) --> \(.end | format_time)\n\(.w)"] | join("\n\n")) + "\n"
' "$1"
  • The output is one word per subtitle line, that is not very friendly to create a subtitle for a video or audio recording.
  • Do you know a way to convert the transcription in a more traditional (sentence-level timestamps) subtitle?
Workaround

Using Word Timestamp to Subtitles online tool, I was able to get an expected formatted subtitle from JSON output (from parakeet), but I'm searching a local/offline tool, because privacy.

This should work but give me errors, and I'm not a programmer to fix that.

主要语言
C++
星标
844
派生
103
平均合并
8 小时 27 分钟
30 天内合并 PR
26

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mudler/parakeet.cpp 的其他 Issue

查看 mudler/parakeet.cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。