From 433842383393a84f16a33f0c012f18a5a1786f5e Mon Sep 17 00:00:00 2001 From: John Ryan Date: Mon, 14 Aug 2023 14:01:15 +0100 Subject: [PATCH] Byte convert inside --- whispercpp.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whispercpp.pyx b/whispercpp.pyx index 1ce83b8..ac020c0 100644 --- a/whispercpp.pyx +++ b/whispercpp.pyx @@ -113,7 +113,8 @@ cdef class Whisper: cdef cnp.ndarray[cnp.float32_t, ndim=1, mode="c"] frames = temp - cdef char* c_string = lang # Convert bytes to char* + language_bytes = str(lang).encode("utf-8") + cdef char* c_string = language_bytes # Convert bytes to char* params = default_params(c_string)