Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensevoice 增加置信度输出 #2083

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

sensevoice 增加置信度输出 #2083

wants to merge 1 commit into from

Conversation

wantt
Copy link

@wantt wantt commented Sep 15, 2024

输出结果增加置信度输出

修改前输出格式: result_i = {"key": key[i], "text": text}

修改后输出格式:result_i = {"key": key[i], "text": text,"token_probs": token_probs }

以下是一个输出样例

[ { "key": "en", "text": "<|en|><|NEUTRAL|><|Speech|><|withitn|>The tribal chieftain called for the boy and presented him with 50 pieces of gold.", "token_probs": [ [ "<|en|>", 0.9999994039539004 ], [ "<|NEUTRAL|>", 0.6650255170850227 ], [ "<|Speech|>", 0.9988953170967498 ], [ "<|withitn|>", 1 ], [ "The", 0.9999670993193821 ], [ "tri", 0.9951907347523162 ], [ "bal", 0.9998259847282137 ], [ "chief", 0.9997330424830995 ], [ "tain", 0.9998868831779733 ], [ "called", 0.9992851364546496 ], [ "for", 0.9992235970978443 ], [ "the", 0.9991294577839298 ], [ "boy", 0.9301944527327015 ], [ "and", 0.9978013800052254 ], [ "presented", 0.995074099711129 ], [ "him", 0.99313369103405 ], [ "with", 0.9990471153011622 ], [ "", 0.9982630434699987 ], [ "5", 0.9995348234280294 ], [ "0", 0.9989625261045192 ], [ "pieces", 0.9995082651587693 ], [ "of", 0.9992288342347033 ], [ "gold", 0.9997841585713534 ], [ ".", 0.9979425173465579 ] ] } ]

@wantt wantt closed this Sep 15, 2024
@wantt wantt reopened this Sep 15, 2024
@wantt wantt closed this Sep 15, 2024
@wantt wantt reopened this Sep 15, 2024
@LauraGPT
Copy link
Collaborator

可以增加一个flag来进行控制,例如,output_ token_probs=True/False,默认是False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants