Merge pull request #1010 from pipecat-ai/ios-simplechatbot-assorted-improvements

iOS SimpleChatbot assorted improvements
This commit is contained in:
kompfner
2025-01-16 13:59:45 -05:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ class CallContainerModel: ObservableObject {
@MainActor @MainActor
func disconnect() { func disconnect() {
self.rtviClientIOS?.disconnect(completion: nil) self.rtviClientIOS?.disconnect(completion: nil)
self.rtviClientIOS?.release()
} }
func showError(message: String) { func showError(message: String) {
@@ -135,7 +136,7 @@ class CallContainerModel: ObservableObject {
} }
} }
extension CallContainerModel:RTVIClientDelegate, LLMHelperDelegate { extension CallContainerModel:RTVIClientDelegate {
private func handleEvent(eventName: String, eventValue: Any? = nil) { private func handleEvent(eventName: String, eventValue: Any? = nil) {
if let value = eventValue { if let value = eventValue {

View File

@@ -13,7 +13,7 @@ struct SettingsView: View {
var body: some View { var body: some View {
NavigationView { NavigationView {
Form { Form {
Section(header: Text("Audio Settings")) { Section {
List(model.availableMics, id: \.self.id.id) { mic in List(model.availableMics, id: \.self.id.id) { mic in
Button(action: { Button(action: {
model.selectMic(mic.id) 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")) { Section(header: Text("Start options")) {
Toggle("Enable Microphone", isOn: $isMicEnabled) Toggle("Enable Microphone", isOn: $isMicEnabled)