mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 10:16:14 +00:00
update prompt for decoding
This commit is contained in:
parent
40e4ac480c
commit
16f18080be
@ -280,10 +280,14 @@ def decode_one_batch(
|
||||
feature_len = feature_len.to(device, dtype=dtype)
|
||||
|
||||
messages = [[
|
||||
{"role": "system", "content": "你是一个能处理音频的助手。"},
|
||||
{"role": "user", "content": f"请转写音频为文字 {DEFAULT_SPEECH_TOKEN}"},
|
||||
{"role": "user", "content": f"{DEFAULT_SPEECH_TOKEN}请转写音频为文字"},
|
||||
{"role": "assistant", "content": ""},
|
||||
]] * len(feature)
|
||||
# messages = [[
|
||||
# {"role": "system", "content": "你是一个能处理音频的助手。"},
|
||||
# {"role": "user", "content": f"请转写音频为文字 {DEFAULT_SPEECH_TOKEN}"},
|
||||
# {"role": "assistant", "content": ""},
|
||||
# ]] * len(feature)
|
||||
|
||||
input_ids, attention_mask = preprocess(
|
||||
messages, tokenizer, max_len=128
|
||||
|
Loading…
x
Reference in New Issue
Block a user