Update whispercpp.pyx

This commit is contained in:
Luke Southam 2022-12-16 01:11:18 +00:00 committed by GitHub
parent c5f51d5b55
commit 64008a7d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,8 @@ cdef class Whisper:
cdef audio_data data = load_audio(<bytes>filename)
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:
raise RuntimeError
cdef int n_segments = whisper_full_n_segments(self.ctx)