Skip to content

Commit

Permalink
Properly displaying spoken text
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshg committed May 15, 2017
1 parent 5b73ed6 commit b7b4b60
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions MacAssistant/AssistantViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,15 @@ class AssistantViewController: NSViewController, ConversationTextDelegate, AVAud
}

func updateRequestText(_ text: String) {
if (!text.isEmpty) {

}
print("Request text: \(text)")
spokenTextLabel.stringValue = "\"\(text)\""
conversation.append(ConversationEntry(text: text, fromUser: true))
DispatchQueue.main.async {
self.spokenTextLabel.stringValue = "\"\(text)\""
}
// conversation.append(ConversationEntry(text: text, fromUser: true))
}

func updateResponseText(_ text: String) {
conversation.append(ConversationEntry(text: text, fromUser: false))
// conversation.append(ConversationEntry(text: text, fromUser: false))
}

@IBAction func gearClicked(_ sender: Any) {
Expand Down

0 comments on commit b7b4b60

Please sign in to comment.