Flush stderr on write (#248)
This commit is contained in:
@@ -142,6 +142,7 @@ as the device_name.
|
|||||||
[](auto c) { return std::tolower(c); });
|
[](auto c) { return std::tolower(c); });
|
||||||
|
|
||||||
display.Print(segment_index, text);
|
display.Print(segment_index, text);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_endpoint) {
|
if (is_endpoint) {
|
||||||
|
|||||||
@@ -139,12 +139,14 @@ for a list of pre-trained models to download.
|
|||||||
std::transform(text.begin(), text.end(), text.begin(),
|
std::transform(text.begin(), text.end(), text.begin(),
|
||||||
[](auto c) { return std::tolower(c); });
|
[](auto c) { return std::tolower(c); });
|
||||||
|
|
||||||
display.Print(segment_index, text);
|
fprintf(stderr, "\r%d: %s", segment_index, text.c_str());
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_endpoint) {
|
if (is_endpoint) {
|
||||||
if (!text.empty()) {
|
if (!text.empty()) {
|
||||||
++segment_index;
|
++segment_index;
|
||||||
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
recognizer.Reset(s.get());
|
recognizer.Reset(s.get());
|
||||||
|
|||||||
Reference in New Issue
Block a user