Update whispercpp.pyx
This commit is contained in:
parent
c5f51d5b55
commit
64008a7d64
|
@ -103,7 +103,8 @@ cdef class Whisper:
|
||||||
cdef audio_data data = load_audio(<bytes>filename)
|
cdef audio_data data = load_audio(<bytes>filename)
|
||||||
return whisper_full(self.ctx, self.params, data.frames, data.n_frames)
|
return whisper_full(self.ctx, self.params, data.frames, data.n_frames)
|
||||||
|
|
||||||
cpdef list extract_text(self, int res):
|
def extract_text(self, int res):
|
||||||
|
print("Extracting text...")
|
||||||
if res != 0:
|
if res != 0:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
cdef int n_segments = whisper_full_n_segments(self.ctx)
|
cdef int n_segments = whisper_full_n_segments(self.ctx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user