一段对白,配一句配音
voice "hua-bao_shou_ma.wav"
hua "这瓜保熟吗?"
voice "hao-shui_guo_tan.wav"
hao "我开水果摊的,能卖给你生瓜蛋子啊?"
voice 不可以连用
连续使用多个 voice, 后面的语句会顶替前面的,你只能听到最后一句语音:
# 这样行不通
voice "hao-gu_yi_zhao_cha.wav" # 这一条没有声音
voice "hao-yao_bu_yao_ba.wav"
hao @ angry "你是故意找茬儿,是不是?你要不要吧?"
voice 是个特殊的 channel
虽然官方的文档 中说:
The name of a channel is expected following the keyword play. (Usually, this is either “sound”, “music”, “voice”, or “audio”). This is followed by audiofile(s), where audiofile(s) can be one file or list of files. When the list is given, the item of it is played in order.
但是实际上,play 语句后面并不能跟 voice channel.
# 这样行不通
play voice "hao-yao_bu_yao_ba.wav" # 这样是没有声音的
hao @ angry "你是故意找茬儿,是不是?你要不要吧?"
voice 不支持 queue
# 这样行不通
voice "hao-gu_yi_zhao_cha.wav"
queue voice "hao-yao_bu_yao_ba.wav" # 这一条没有声音
hao @ angry "你是故意找茬儿,是不是?你要不要吧?"
另外,voice 也不支持接受 list
# 这样行不通
voice ["hao-gu_yi_zhao_cha.wav", "hao-yao_bu_yao_ba.wav"] # 这样是没有声音的。
hao @ angry "你是故意找茬儿,是不是?你要不要吧?"
一些曲线方案
使用 sound 和 queue
搭配 queue, sound 会一条一条连续播放,并且只播放一次。
play sound "hao-gu_yi_zhao_cha.wav"
queue sound "hao-yao_bu_yao_ba.wav"
hao @ angry "你是故意找茬儿,是不是?你要不要吧?"
使用 extend 可能还有 {nw}
使用 extend 的话,第二条对白的内容会接在前一条对白后面,而不会进行切换。
voice "hao-gu_yi_zhao_cha.wav"
hao @ angry "你是故意找茬儿,是不是?"
voice "hao-yao_bu_yao_ba.wav"
extend @ angry "你要不要吧?"
还可以在第一句对白的末尾添加 {nw} 标签
,这会在第一句话结束后直接跳到下一句对白,搭配 extend 刚刚好。不过这会有所停顿,需要根据场景进行调整。