We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de38850 commit 654f1b4Copy full SHA for 654f1b4
examples/stream/stream.cpp
@@ -352,14 +352,17 @@ int main(int argc, char ** argv) {
352
353
// print result;
354
{
355
+ const int n_segments = whisper_full_n_segments(ctx);
356
+ if (n_segments == 0) {
357
+ continue;
358
+ }
359
printf("\33[2K\r");
360
361
// print long empty line to clear the previous line
362
printf("%s", std::string(100, ' ').c_str());
363
364
365
- const int n_segments = whisper_full_n_segments(ctx);
366
for (int i = 0; i < n_segments; ++i) {
367
const char * text = whisper_full_get_segment_text(ctx, i);
368
0 commit comments