ggml-org/whisper.cpp

SetMaxTokensPerSegment in go binding causes the segements to end prematurely

开放

#984 创建于 2023年6月3日

 (1 条评论) (1 个反应) (0 位负责人)C++ (6,072 个派生)batch import
buggood first issuehelp wanted

仓库指标

星标
 (52,942 个星标)
PR 合并指标
 (平均合并 5天 20小时) (30 天内合并 36 个 PR)

描述

When I use context.SetMaxTokensPerSegment and context.NextSegment, it generates incomplete segments. e.g. when tested using the jfk.wav sample, it gives the following output:

wspr_test.go:33: {Text:And so my fellow Americans ask Start:0s End:30s}

when this value is not set, it gives the correct output:

wspr_test.go:33: {Text:And so my fellow Americans ask not what your country can do for you Start:0s End:8s}
wspr_test.go:33: {Text:ask what you can do for your country. Start:8s End:11s}

test case: https://github.com/JackKCWong/go-whisper-test/blob/main/pkg/whisper/wspr_test.go#L29

贡献者指南