From 1e7e307f697bd49c028eb80b84c06b09fcd01c6d Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Thu, 16 Jan 2025 10:30:06 -0500 Subject: [PATCH 1/3] In iOS SimpleChatbot demo, call `release()` when disconnecting the voice client, since we're not using it after disconnecting --- .../client/ios/SimpleChatbot/model/CallContainerModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift index 9dd1f620f..270bb5730 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift +++ b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift @@ -81,6 +81,7 @@ class CallContainerModel: ObservableObject { @MainActor func disconnect() { self.rtviClientIOS?.disconnect(completion: nil) + self.rtviClientIOS?.release() } func showError(message: String) { From c9834e2712349727106986b46150caa90dd55fb3 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Thu, 16 Jan 2025 10:31:17 -0500 Subject: [PATCH 2/3] In iOS SimpleChatbot demo, remove unused LLMHelperDelegate protocol conformance --- .../client/ios/SimpleChatbot/model/CallContainerModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift index 270bb5730..d8db7cced 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift +++ b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift @@ -136,7 +136,7 @@ class CallContainerModel: ObservableObject { } } -extension CallContainerModel:RTVIClientDelegate, LLMHelperDelegate { +extension CallContainerModel:RTVIClientDelegate { private func handleEvent(eventName: String, eventValue: Any? = nil) { if let value = eventValue { From 156fffe6fc4a176d93cdf296295c1867cd28dc10 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Thu, 16 Jan 2025 10:32:55 -0500 Subject: [PATCH 3/3] In iOS SimpleChatbot demo, add clarifying note to Audio Settings section header explaining that "(No selection = system default)". Ideally we could add a row showing that the system default is selected, but this is OK as a short-term fix. Also, the presence of that row might suggest that "system default" is selectable, but it's not: this is currently a limitation in the Pipecat Client. --- .../ios/SimpleChatbot/views/settings/SettingsView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot/views/settings/SettingsView.swift b/examples/simple-chatbot/client/ios/SimpleChatbot/views/settings/SettingsView.swift index 7d291561c..8a503d410 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot/views/settings/SettingsView.swift +++ b/examples/simple-chatbot/client/ios/SimpleChatbot/views/settings/SettingsView.swift @@ -13,7 +13,7 @@ struct SettingsView: View { var body: some View { NavigationView { Form { - Section(header: Text("Audio Settings")) { + Section { List(model.availableMics, id: \.self.id.id) { mic in Button(action: { model.selectMic(mic.id) @@ -27,6 +27,11 @@ struct SettingsView: View { } } } + } header: { + VStack(alignment: .leading) { + Text("Audio Settings") + Text("(No selection = system default)") + } } Section(header: Text("Start options")) { Toggle("Enable Microphone", isOn: $isMicEnabled)