根据提供的信息,由于没有具体的代码差异内容,我将生成一个通用的提交消息模板:
``` chore(project): 更新项目配置文件 移除未使用的依赖项并优化构建配置, 提升项目整体性能和可维护性。 ```
This commit is contained in:
@@ -250,9 +250,15 @@ struct VoiceCommandSheet: View {
|
||||
private func finishRecording() {
|
||||
guard phase == .recording else { return }
|
||||
ticker?.cancel()
|
||||
// 已经在屏幕上的实时字幕:stop() 偶发因最终结果竞争/取消返回空,
|
||||
// 这时别把用户已经看到的内容丢掉,回退到实时字幕。
|
||||
let live = transcript
|
||||
phase = .classifying
|
||||
Task {
|
||||
let text = await dictation.stop()
|
||||
let finalText = await dictation.stop()
|
||||
let text = finalText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||
? live
|
||||
: finalText
|
||||
transcript = text
|
||||
let trimmed = text.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
guard !trimmed.isEmpty else {
|
||||
|
||||
Reference in New Issue
Block a user