mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
fix missing token issue
This commit is contained in:
parent
0ad085f5e8
commit
949f97a8b4
@ -271,7 +271,7 @@ byte_decoder = {v:k for k, v in byte_encoder.items()}
|
|||||||
fout.write(struct.pack("i", len(tokens)))
|
fout.write(struct.pack("i", len(tokens)))
|
||||||
|
|
||||||
for key in tokens:
|
for key in tokens:
|
||||||
text = bytearray([byte_decoder[c] for c in key]).decode('utf-8', errors='replace').encode('utf-8')
|
text = bytearray([byte_decoder[c] for c in key])
|
||||||
fout.write(struct.pack("i", len(text)))
|
fout.write(struct.pack("i", len(text)))
|
||||||
fout.write(text)
|
fout.write(text)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user