正在显示
2 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -142,6 +142,7 @@ as the device_name. | @@ -142,6 +142,7 @@ as the device_name. | ||
| 142 | [](auto c) { return std::tolower(c); }); | 142 | [](auto c) { return std::tolower(c); }); |
| 143 | 143 | ||
| 144 | display.Print(segment_index, text); | 144 | display.Print(segment_index, text); |
| 145 | + fflush(stderr); | ||
| 145 | } | 146 | } |
| 146 | 147 | ||
| 147 | if (is_endpoint) { | 148 | if (is_endpoint) { |
| @@ -139,12 +139,14 @@ for a list of pre-trained models to download. | @@ -139,12 +139,14 @@ for a list of pre-trained models to download. | ||
| 139 | std::transform(text.begin(), text.end(), text.begin(), | 139 | std::transform(text.begin(), text.end(), text.begin(), |
| 140 | [](auto c) { return std::tolower(c); }); | 140 | [](auto c) { return std::tolower(c); }); |
| 141 | 141 | ||
| 142 | - display.Print(segment_index, text); | 142 | + fprintf(stderr, "\r%d: %s", segment_index, text.c_str()); |
| 143 | + fflush(stderr); | ||
| 143 | } | 144 | } |
| 144 | 145 | ||
| 145 | if (is_endpoint) { | 146 | if (is_endpoint) { |
| 146 | if (!text.empty()) { | 147 | if (!text.empty()) { |
| 147 | ++segment_index; | 148 | ++segment_index; |
| 149 | + fprintf(stderr, "\n"); | ||
| 148 | } | 150 | } |
| 149 | 151 | ||
| 150 | recognizer.Reset(s.get()); | 152 | recognizer.Reset(s.get()); |
-
请 注册 或 登录 后发表评论