whisper.objc : disable timestamps for real-time transcription
This commit is contained in:
parent
29511d33c7
commit
9521ba6801
@ -206,6 +206,7 @@ void AudioInputCallback(void * inUserData,
|
|||||||
params.offset_ms = 0;
|
params.offset_ms = 0;
|
||||||
params.no_context = true;
|
params.no_context = true;
|
||||||
params.single_segment = self->stateInp.isRealtime;
|
params.single_segment = self->stateInp.isRealtime;
|
||||||
|
params.no_timestamps = params.single_segment;
|
||||||
|
|
||||||
CFTimeInterval startTime = CACurrentMediaTime();
|
CFTimeInterval startTime = CACurrentMediaTime();
|
||||||
|
|
||||||
|
@ -24,16 +24,16 @@ actor WhisperContext {
|
|||||||
var params = whisper_full_default_params(WHISPER_SAMPLING_GREEDY)
|
var params = whisper_full_default_params(WHISPER_SAMPLING_GREEDY)
|
||||||
"en".withCString { en in
|
"en".withCString { en in
|
||||||
// Adapted from whisper.objc
|
// Adapted from whisper.objc
|
||||||
params.print_realtime = true
|
params.print_realtime = true
|
||||||
params.print_progress = false
|
params.print_progress = false
|
||||||
params.print_timestamps = true
|
params.print_timestamps = true
|
||||||
params.print_special = false
|
params.print_special = false
|
||||||
params.translate = false
|
params.translate = false
|
||||||
params.language = en
|
params.language = en
|
||||||
params.n_threads = Int32(maxThreads)
|
params.n_threads = Int32(maxThreads)
|
||||||
params.offset_ms = 0
|
params.offset_ms = 0
|
||||||
params.no_context = true
|
params.no_context = true
|
||||||
params.single_segment = false
|
params.single_segment = false
|
||||||
|
|
||||||
whisper_reset_timings(context)
|
whisper_reset_timings(context)
|
||||||
print("About to run whisper_full")
|
print("About to run whisper_full")
|
||||||
|
Loading…
Reference in New Issue
Block a user