k2-fsa/sherpa-ncnn

ios bug

Closed this issue · 1 comments

Android has fixed the bug by #265 , while the bug is still alive in ios. it seems not restart the model or something after decoding one wave.

when decoding a wav list, each decoding result after the second wav will have the last character. for example:
wavlist:
1.wav
1.wav
1.wav,
decodeing results:
1.wav 今天天气很好
1.wav 好今天天气很好
1.wav 好今天天气很好
Invoking CreatStream() before decode one wav can solve this problem. Note: invoking Reset() is useless because

// Note: We only reset the counter. The underlying audio samples are
(I doubt that). BTW, the overhead of CreatStream() is little. so you can do that.