From 9905233bc46f7eec84cb9296373de558354b94f3 Mon Sep 17 00:00:00 2001 From: marcus-daily <111281783+marcus-daily@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:54:41 +0000 Subject: [PATCH 1/5] Rename rtvi-client-android to pipecat-client-android --- .github/workflows/ci.yaml | 8 +-- CHANGELOG.md | 7 +- README.md | 12 ++-- .../.gitignore | 0 .../build.gradle.kts | 30 ++++---- .../proguard-rules.pro | 0 .../src/main/AndroidManifest.xml | 0 .../java/ai/pipecat/client/PipecatClient.kt | 72 +++++++++---------- .../ai/pipecat}/client/RTVIClientOptions.kt | 8 +-- .../ai/pipecat}/client/RTVIClientParams.kt | 8 +-- .../ai/pipecat}/client/RTVIEventCallbacks.kt | 20 +++--- .../ai/pipecat}/client/helper/LLMHelper.kt | 22 +++--- .../java/ai/pipecat}/client/helper/Legacy.kt | 2 +- .../client/helper/RTVIClientHelper.kt | 18 ++--- .../ai/pipecat}/client/result/Callback.kt | 2 +- .../java/ai/pipecat}/client/result/Future.kt | 4 +- .../ai/pipecat}/client/result/HttpError.kt | 2 +- .../java/ai/pipecat}/client/result/Legacy.kt | 2 +- .../java/ai/pipecat}/client/result/Promise.kt | 4 +- .../ai/pipecat}/client/result/RTVIError.kt | 6 +- .../pipecat}/client/result/RTVIException.kt | 2 +- .../java/ai/pipecat}/client/result/Result.kt | 2 +- .../pipecat}/client/result/ResultCallback.kt | 2 +- .../pipecat}/client/transport/AuthBundle.kt | 2 +- .../client/transport/MsgClientToServer.kt | 8 +-- .../client/transport/MsgServerToClient.kt | 10 +-- .../ai/pipecat}/client/transport/Transport.kt | 16 ++--- .../client/transport/TransportContext.kt | 8 +-- .../client/transport/TransportFactory.kt | 2 +- .../client/types/ActionDescription.kt | 2 +- .../java/ai/pipecat}/client/types/Config.kt | 2 +- .../ai/pipecat}/client/types/MediaDeviceId.kt | 2 +- .../pipecat}/client/types/MediaDeviceInfo.kt | 2 +- .../ai/pipecat}/client/types/MediaTrackId.kt | 2 +- .../java/ai/pipecat}/client/types/Option.kt | 2 +- .../client/types/OptionDescription.kt | 2 +- .../ai/pipecat}/client/types/Participant.kt | 2 +- .../ai/pipecat}/client/types/ParticipantId.kt | 2 +- .../client/types/ParticipantTracks.kt | 2 +- .../pipecat}/client/types/PipecatMetrics.kt | 2 +- .../client/types/PipecatMetricsData.kt | 2 +- .../pipecat}/client/types/RTVIURLEndpoints.kt | 2 +- .../pipecat}/client/types/RegisteredHelper.kt | 4 +- .../ai/pipecat}/client/types/ServiceConfig.kt | 2 +- .../client/types/ServiceConfigDescription.kt | 2 +- .../client/types/ServiceRegistration.kt | 2 +- .../java/ai/pipecat}/client/types/Tracks.kt | 2 +- .../ai/pipecat}/client/types/Transcript.kt | 2 +- .../pipecat}/client/types/TransportState.kt | 2 +- .../java/ai/pipecat}/client/types/Type.kt | 2 +- .../java/ai/pipecat}/client/types/Value.kt | 2 +- .../pipecat}/client/utils/ConnectionBundle.kt | 6 +- .../java/ai/pipecat}/client/utils/Http.kt | 8 +-- .../java/ai/pipecat}/client/utils/Json.kt | 4 +- .../ai/pipecat}/client/utils/ThreadRef.kt | 6 +- .../src/main/java/ai/rtvi/client/Legacy.kt | 11 --- settings.gradle.kts | 4 +- 57 files changed, 179 insertions(+), 185 deletions(-) rename {rtvi-client-android => pipecat-client-android}/.gitignore (100%) rename {rtvi-client-android => pipecat-client-android}/build.gradle.kts (70%) rename {rtvi-client-android => pipecat-client-android}/proguard-rules.pro (100%) rename {rtvi-client-android => pipecat-client-android}/src/main/AndroidManifest.xml (100%) rename rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClient.kt => pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt (92%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/RTVIClientOptions.kt (87%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/RTVIClientParams.kt (82%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/RTVIEventCallbacks.kt (94%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/helper/LLMHelper.kt (94%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/helper/Legacy.kt (87%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/helper/RTVIClientHelper.kt (81%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/Callback.kt (77%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/Future.kt (97%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/HttpError.kt (96%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/Legacy.kt (84%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/Promise.kt (96%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/RTVIError.kt (93%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/RTVIException.kt (88%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/Result.kt (98%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/result/ResultCallback.kt (80%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/AuthBundle.kt (77%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/MsgClientToServer.kt (92%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/MsgServerToClient.kt (92%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/Transport.kt (81%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/TransportContext.kt (64%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/transport/TransportFactory.kt (79%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ActionDescription.kt (86%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Config.kt (64%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/MediaDeviceId.kt (75%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/MediaDeviceInfo.kt (79%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/MediaTrackId.kt (73%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Option.kt (95%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/OptionDescription.kt (80%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Participant.kt (88%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ParticipantId.kt (76%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ParticipantTracks.kt (82%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/PipecatMetrics.kt (88%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/PipecatMetricsData.kt (86%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/RTVIURLEndpoints.kt (76%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/RegisteredHelper.kt (57%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ServiceConfig.kt (81%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ServiceConfigDescription.kt (83%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/ServiceRegistration.kt (81%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Tracks.kt (82%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Transcript.kt (90%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/TransportState.kt (86%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Type.kt (90%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/types/Value.kt (99%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/utils/ConnectionBundle.kt (86%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/utils/Http.kt (94%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/utils/Json.kt (84%) rename {rtvi-client-android/src/main/java/ai/rtvi => pipecat-client-android/src/main/java/ai/pipecat}/client/utils/ThreadRef.kt (93%) delete mode 100644 rtvi-client-android/src/main/java/ai/rtvi/client/Legacy.kt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c9019c9..2cccd87 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,13 +37,13 @@ jobs: java-version: '17' - name: Build core SDK - run: ./gradlew :rtvi-client-android:assembleRelease + run: ./gradlew :pipecat-client-android:assembleRelease - name: Generate Maven repo - run: ./gradlew :rtvi-client-android:publishAllPublicationsToRTVILocalRepoRepository + run: ./gradlew :pipecat-client-android:publishAllPublicationsToPipecatLocalRepoRepository - name: Upload Maven repo uses: actions/upload-artifact@v4 with: - name: RTVIClientAndroid-Repo - path: build/RTVILocalRepo + name: PipecatClientAndroid-Repo + path: build/PipecatLocalRepo diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7ffd8..de13cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.3.0 + +- Project renamed to `pipecat-client-android` +- `RTVIClient` renamed to `PipecatClient` + # 0.2.1 - Added callbacks: @@ -30,4 +35,4 @@ - Added callbacks - `onBotLLMText()` - `onBotTTSText()` - - `onStorageItemStored()` \ No newline at end of file + - `onStorageItemStored()` diff --git a/README.md b/README.md index 9aa1201..beb73f4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Real-Time Voice Inference Android Client SDK +# Pipecat Android Client SDK [RTVI](https://github.com/rtvi-ai/) is an open standard for Real-Time Voice (and Video) Inference. @@ -6,20 +6,20 @@ This Android library contains the core components and types needed to set up an When building an RTVI application, you should use the transport-specific client library (see [here](https://rtvi.mintlify.app/api-reference/transports/introduction) for available first-party -packages.) The base `VoiceClient` has no transport included. +packages.) The base `PipecatClient` has no transport included. ## Usage Add the following dependency to your `build.gradle` file: ``` -implementation "ai.rtvi:client:0.2.1" +implementation "ai.pipecat:client:0.3.0" ``` -Then instantiate the `VoiceClient` from your code, specifying the backend `baseUrl` and transport. +Then instantiate the `PipecatClient` from your code, specifying the backend `baseUrl` and transport. ```kotlin -val callbacks = object : VoiceEventCallbacks() { +val callbacks = object : RTVIEventCallbacks() { override fun onBackendError(message: String) { Log.e(TAG, "Error from backend: $message") @@ -28,7 +28,7 @@ val callbacks = object : VoiceEventCallbacks() { // ... } -val client = VoiceClient(baseUrl, transport, callbacks) +val client = PipecatClient(transport, callbacks, options) client.start().withCallback { // ... diff --git a/rtvi-client-android/.gitignore b/pipecat-client-android/.gitignore similarity index 100% rename from rtvi-client-android/.gitignore rename to pipecat-client-android/.gitignore diff --git a/rtvi-client-android/build.gradle.kts b/pipecat-client-android/build.gradle.kts similarity index 70% rename from rtvi-client-android/build.gradle.kts rename to pipecat-client-android/build.gradle.kts index 67e2e61..6b13d18 100644 --- a/rtvi-client-android/build.gradle.kts +++ b/pipecat-client-android/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } android { - namespace = "ai.rtvi.client" + namespace = "ai.pipecat.client" compileSdk = 34 defaultConfig { @@ -51,40 +51,40 @@ dependencies { publishing { repositories { maven { - url = rootProject.layout.buildDirectory.dir("RTVILocalRepo").get().asFile.toURI() - name = "RTVILocalRepo" + url = rootProject.layout.buildDirectory.dir("PipecatLocalRepo").get().asFile.toURI() + name = "PipecatLocalRepo" } } publications { register("release") { - groupId = "ai.rtvi" + groupId = "ai.pipecat" artifactId = "client" - version = "0.2.1" + version = "0.3.0" pom { - name.set("RTVI Client") - description.set("Core RTVI client library for Android") - url.set("https://github.com/rtvi-ai/rtvi-client-android") + name.set("Pipecat Client") + description.set("Core Pipecat client library for Android") + url.set("https://github.com/pipecat-ai/pipecat-client-android") developers { developer { - id.set("rtvi.ai") - name.set("rtvi.ai") + id.set("pipecat.ai") + name.set("pipecat.ai") } } licenses { license { name.set("BSD 2-Clause License") - url.set("https://github.com/rtvi-ai/rtvi-client-android/blob/main/LICENSE") + url.set("https://github.com/pipecat-ai/pipecat-client-android/blob/main/LICENSE") } } scm { - connection.set("scm:git:git://github.com/rtvi-ai/rtvi-client-android.git") - developerConnection.set("scm:git:ssh://github.com:rtvi-ai/rtvi-client-android.git") - url.set("https://github.com/rtvi-ai/rtvi-client-android") + connection.set("scm:git:git://github.com/pipecat-ai/pipecat-client-android.git") + developerConnection.set("scm:git:ssh://github.com:pipecat-ai/pipecat-client-android.git") + url.set("https://github.com/pipecat-ai/pipecat-client-android") } } @@ -103,4 +103,4 @@ signing { useInMemoryPgpKeys(signingKey, signingPassphrase) sign(publishing.publications) } -} \ No newline at end of file +} diff --git a/rtvi-client-android/proguard-rules.pro b/pipecat-client-android/proguard-rules.pro similarity index 100% rename from rtvi-client-android/proguard-rules.pro rename to pipecat-client-android/proguard-rules.pro diff --git a/rtvi-client-android/src/main/AndroidManifest.xml b/pipecat-client-android/src/main/AndroidManifest.xml similarity index 100% rename from rtvi-client-android/src/main/AndroidManifest.xml rename to pipecat-client-android/src/main/AndroidManifest.xml diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClient.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt similarity index 92% rename from rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClient.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt index cc4c9b1..a4d7b34 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClient.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt @@ -1,37 +1,37 @@ -package ai.rtvi.client - -import ai.rtvi.client.helper.RTVIClientHelper -import ai.rtvi.client.helper.RegisteredRTVIClient -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.Promise -import ai.rtvi.client.result.RTVIError -import ai.rtvi.client.result.RTVIException -import ai.rtvi.client.result.Result -import ai.rtvi.client.result.resolvedPromiseErr -import ai.rtvi.client.result.withPromise -import ai.rtvi.client.result.withTimeout -import ai.rtvi.client.transport.AuthBundle -import ai.rtvi.client.transport.MsgClientToServer -import ai.rtvi.client.transport.MsgServerToClient -import ai.rtvi.client.transport.Transport -import ai.rtvi.client.transport.TransportContext -import ai.rtvi.client.transport.TransportFactory -import ai.rtvi.client.types.ActionDescription -import ai.rtvi.client.types.Config -import ai.rtvi.client.types.MediaDeviceId -import ai.rtvi.client.types.Option -import ai.rtvi.client.types.RegisteredHelper -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.ServiceConfigDescription -import ai.rtvi.client.types.Transcript -import ai.rtvi.client.types.TransportState -import ai.rtvi.client.types.Value -import ai.rtvi.client.utils.ConnectionBundle -import ai.rtvi.client.utils.JSON_INSTANCE -import ai.rtvi.client.utils.ThreadRef -import ai.rtvi.client.utils.parseServerSentEvents -import ai.rtvi.client.utils.post -import ai.rtvi.client.utils.valueFrom +package ai.pipecat.client + +import ai.pipecat.client.helper.RTVIClientHelper +import ai.pipecat.client.helper.RegisteredRTVIClient +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.Promise +import ai.pipecat.client.result.RTVIError +import ai.pipecat.client.result.RTVIException +import ai.pipecat.client.result.Result +import ai.pipecat.client.result.resolvedPromiseErr +import ai.pipecat.client.result.withPromise +import ai.pipecat.client.result.withTimeout +import ai.pipecat.client.transport.AuthBundle +import ai.pipecat.client.transport.MsgClientToServer +import ai.pipecat.client.transport.MsgServerToClient +import ai.pipecat.client.transport.Transport +import ai.pipecat.client.transport.TransportContext +import ai.pipecat.client.transport.TransportFactory +import ai.pipecat.client.types.ActionDescription +import ai.pipecat.client.types.Config +import ai.pipecat.client.types.MediaDeviceId +import ai.pipecat.client.types.Option +import ai.pipecat.client.types.RegisteredHelper +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.ServiceConfigDescription +import ai.pipecat.client.types.Transcript +import ai.pipecat.client.types.TransportState +import ai.pipecat.client.types.Value +import ai.pipecat.client.utils.ConnectionBundle +import ai.pipecat.client.utils.JSON_INSTANCE +import ai.pipecat.client.utils.ThreadRef +import ai.pipecat.client.utils.parseServerSentEvents +import ai.pipecat.client.utils.post +import ai.pipecat.client.utils.valueFrom import android.util.Log import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonPrimitive @@ -40,7 +40,7 @@ import kotlinx.serialization.json.jsonObject import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody -private const val RTVI_PROTOCOL_VERSION = "0.2.0" +private const val RTVI_PROTOCOL_VERSION = "0.3.0" /** * An RTVI client. Connects to an RTVI backend and handles bidirectional audio and video @@ -53,7 +53,7 @@ private const val RTVI_PROTOCOL_VERSION = "0.2.0" * @param options Additional options for configuring the client and backend. */ @Suppress("unused") -open class RTVIClient( +open class PipecatClient( transport: TransportFactory, callbacks: RTVIEventCallbacks, private var options: RTVIClientOptions, diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientOptions.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientOptions.kt similarity index 87% rename from rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientOptions.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientOptions.kt index 7f6d842..0b567eb 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientOptions.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientOptions.kt @@ -1,8 +1,8 @@ -package ai.rtvi.client +package ai.pipecat.client -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.ServiceRegistration -import ai.rtvi.client.types.Value +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.ServiceRegistration +import ai.pipecat.client.types.Value /** * Configuration options when instantiating a [RTVIClient]. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientParams.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientParams.kt similarity index 82% rename from rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientParams.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientParams.kt index 1c795b4..4e428a7 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIClientParams.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIClientParams.kt @@ -1,8 +1,8 @@ -package ai.rtvi.client +package ai.pipecat.client -import ai.rtvi.client.types.RTVIURLEndpoints -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.Value +import ai.pipecat.client.types.RTVIURLEndpoints +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.Value /** * Connection options when instantiating a [RTVIClient]. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIEventCallbacks.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIEventCallbacks.kt similarity index 94% rename from rtvi-client-android/src/main/java/ai/rtvi/client/RTVIEventCallbacks.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/RTVIEventCallbacks.kt index 8d26a67..b3c8253 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/RTVIEventCallbacks.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/RTVIEventCallbacks.kt @@ -1,13 +1,13 @@ -package ai.rtvi.client - -import ai.rtvi.client.transport.MsgServerToClient -import ai.rtvi.client.types.MediaDeviceInfo -import ai.rtvi.client.types.Participant -import ai.rtvi.client.types.PipecatMetrics -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.Tracks -import ai.rtvi.client.types.Transcript -import ai.rtvi.client.types.TransportState +package ai.pipecat.client + +import ai.pipecat.client.transport.MsgServerToClient +import ai.pipecat.client.types.MediaDeviceInfo +import ai.pipecat.client.types.Participant +import ai.pipecat.client.types.PipecatMetrics +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.Tracks +import ai.pipecat.client.types.Transcript +import ai.pipecat.client.types.TransportState /** * Callbacks invoked when changes occur in the RTVI session. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt similarity index 94% rename from rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt index d9958f0..089f560 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/LLMHelper.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt @@ -1,14 +1,14 @@ -package ai.rtvi.client.helper - -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.RTVIError -import ai.rtvi.client.result.resolvedPromiseErr -import ai.rtvi.client.transport.MsgClientToServer -import ai.rtvi.client.transport.MsgServerToClient -import ai.rtvi.client.types.Option -import ai.rtvi.client.types.TransportState -import ai.rtvi.client.types.Value -import ai.rtvi.client.utils.JSON_INSTANCE +package ai.pipecat.client.helper + +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.RTVIError +import ai.pipecat.client.result.resolvedPromiseErr +import ai.pipecat.client.transport.MsgClientToServer +import ai.pipecat.client.transport.MsgServerToClient +import ai.pipecat.client.types.Option +import ai.pipecat.client.types.TransportState +import ai.pipecat.client.types.Value +import ai.pipecat.client.utils.JSON_INSTANCE import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonArray diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/Legacy.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt similarity index 87% rename from rtvi-client-android/src/main/java/ai/rtvi/client/helper/Legacy.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt index f1aa068..1c9b478 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/Legacy.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.helper +package ai.pipecat.client.helper @Deprecated("VoiceClientHelper renamed to RTVIClientHelper") typealias VoiceClientHelper = RTVIClientHelper diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/RTVIClientHelper.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt similarity index 81% rename from rtvi-client-android/src/main/java/ai/rtvi/client/helper/RTVIClientHelper.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt index 7c55f19..6344b8f 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/helper/RTVIClientHelper.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt @@ -1,13 +1,13 @@ -package ai.rtvi.client.helper +package ai.pipecat.client.helper -import ai.rtvi.client.RTVIClient -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.RTVIError -import ai.rtvi.client.result.RTVIException -import ai.rtvi.client.result.resolvedPromiseErr -import ai.rtvi.client.transport.MsgServerToClient -import ai.rtvi.client.types.Option -import ai.rtvi.client.utils.ThreadRef +import ai.pipecat.client.RTVIClient +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.RTVIError +import ai.pipecat.client.result.RTVIException +import ai.pipecat.client.result.resolvedPromiseErr +import ai.pipecat.client.transport.MsgServerToClient +import ai.pipecat.client.types.Option +import ai.pipecat.client.utils.ThreadRef import java.util.concurrent.atomic.AtomicReference abstract class RTVIClientHelper { diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Callback.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Callback.kt similarity index 77% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/Callback.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/Callback.kt index df82b1e..9f28e99 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Callback.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Callback.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result /** * A callback function receiving a value. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Future.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Future.kt similarity index 97% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/Future.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/Future.kt index 78aec24..5765873 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Future.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Future.kt @@ -1,6 +1,6 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result -import ai.rtvi.client.utils.ThreadRef +import ai.pipecat.client.utils.ThreadRef import android.util.Log import kotlin.coroutines.resume import kotlin.coroutines.suspendCoroutine diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/HttpError.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/HttpError.kt similarity index 96% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/HttpError.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/HttpError.kt index 355105c..747e681 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/HttpError.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/HttpError.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result /** * An error occurring due to an HTTP request failing. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Legacy.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Legacy.kt similarity index 84% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/Legacy.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/Legacy.kt index 6eb654d..d816749 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Legacy.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Legacy.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result @Deprecated("VoiceError renamed to RTVIError") typealias VoiceError = RTVIError diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Promise.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Promise.kt similarity index 96% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/Promise.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/Promise.kt index 31edcb3..3ef3ed3 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Promise.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Promise.kt @@ -1,6 +1,6 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result -import ai.rtvi.client.utils.ThreadRef +import ai.pipecat.client.utils.ThreadRef /** * Represents an ongoing asynchronous operation. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIError.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIError.kt similarity index 93% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIError.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIError.kt index baac94a..4f33bbc 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIError.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIError.kt @@ -1,6 +1,6 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result -import ai.rtvi.client.types.TransportState +import ai.pipecat.client.types.TransportState /** * An error occurring during an operation. @@ -22,7 +22,7 @@ abstract class RTVIError { /** * Failed to fetch the authentication bundle from the RTVI backend. */ - data class HttpError(val error: ai.rtvi.client.result.HttpError) : RTVIError() { + data class HttpError(val error: ai.pipecat.client.result.HttpError) : RTVIError() { override val description = error.description } diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIException.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIException.kt similarity index 88% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIException.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIException.kt index 36fd254..c17c38f 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/RTVIException.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/RTVIException.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result class RTVIException( val error: RTVIError diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Result.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Result.kt similarity index 98% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/Result.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/Result.kt index 3d8e543..c19fe72 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/Result.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/Result.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result /** * The result of an operation: either Result.Ok or Result.Err. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/result/ResultCallback.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/result/ResultCallback.kt similarity index 80% rename from rtvi-client-android/src/main/java/ai/rtvi/client/result/ResultCallback.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/result/ResultCallback.kt index 0b1e524..2fd4f63 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/result/ResultCallback.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/result/ResultCallback.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.result +package ai.pipecat.client.result /** * A callback function receiving a Result value. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/AuthBundle.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/AuthBundle.kt similarity index 77% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/AuthBundle.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/AuthBundle.kt index a1cf2c3..62bfc46 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/AuthBundle.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/AuthBundle.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.transport +package ai.pipecat.client.transport /** * A bundle of initialization data received from the RTVI backend. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgClientToServer.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgClientToServer.kt similarity index 92% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgClientToServer.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgClientToServer.kt index 5e19fc1..a72da90 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgClientToServer.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgClientToServer.kt @@ -1,8 +1,8 @@ -package ai.rtvi.client.transport +package ai.pipecat.client.transport -import ai.rtvi.client.types.Option -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.utils.JSON_INSTANCE +import ai.pipecat.client.types.Option +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.utils.JSON_INSTANCE import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.encodeToJsonElement diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgServerToClient.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgServerToClient.kt similarity index 92% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgServerToClient.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgServerToClient.kt index a538a8b..6717a02 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/MsgServerToClient.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/MsgServerToClient.kt @@ -1,9 +1,9 @@ -package ai.rtvi.client.transport +package ai.pipecat.client.transport -import ai.rtvi.client.types.ActionDescription -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.ServiceConfigDescription -import ai.rtvi.client.types.Value +import ai.pipecat.client.types.ActionDescription +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.ServiceConfigDescription +import ai.pipecat.client.types.Value import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonNull diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/Transport.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/Transport.kt similarity index 81% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/Transport.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/Transport.kt index 848daa4..a4125c9 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/Transport.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/Transport.kt @@ -1,11 +1,11 @@ -package ai.rtvi.client.transport - -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.RTVIError -import ai.rtvi.client.types.MediaDeviceId -import ai.rtvi.client.types.MediaDeviceInfo -import ai.rtvi.client.types.Tracks -import ai.rtvi.client.types.TransportState +package ai.pipecat.client.transport + +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.RTVIError +import ai.pipecat.client.types.MediaDeviceId +import ai.pipecat.client.types.MediaDeviceInfo +import ai.pipecat.client.types.Tracks +import ai.pipecat.client.types.TransportState /** * An RTVI transport. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportContext.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportContext.kt similarity index 64% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportContext.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportContext.kt index a55575c..dd1f034 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportContext.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportContext.kt @@ -1,8 +1,8 @@ -package ai.rtvi.client.transport +package ai.pipecat.client.transport -import ai.rtvi.client.RTVIClientOptions -import ai.rtvi.client.RTVIEventCallbacks -import ai.rtvi.client.utils.ThreadRef +import ai.pipecat.client.RTVIClientOptions +import ai.pipecat.client.RTVIEventCallbacks +import ai.pipecat.client.utils.ThreadRef /** * Context for an RTVI transport. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportFactory.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportFactory.kt similarity index 79% rename from rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportFactory.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportFactory.kt index 7e92b7b..7edd057 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/transport/TransportFactory.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/transport/TransportFactory.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.transport +package ai.pipecat.client.transport /** * A creator of Transport objects. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ActionDescription.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ActionDescription.kt similarity index 86% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ActionDescription.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ActionDescription.kt index 7b04d62..2349a85 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ActionDescription.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ActionDescription.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Config.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Config.kt similarity index 64% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Config.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Config.kt index 3d70c4e..3d361d6 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Config.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Config.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types data class Config( val config: List diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceId.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceId.kt similarity index 75% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceId.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceId.kt index 66dafae..b04a130 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceId.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceId.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * A unique identifier for a media device. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceInfo.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceInfo.kt similarity index 79% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceInfo.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceInfo.kt index e46dc08..eadc04d 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaDeviceInfo.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaDeviceInfo.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * Information about a media device. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaTrackId.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaTrackId.kt similarity index 73% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaTrackId.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaTrackId.kt index f36471e..2734283 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/MediaTrackId.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/MediaTrackId.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * An identifier for a media track. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Option.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Option.kt similarity index 95% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Option.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Option.kt index 0c4e59f..b7992e7 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Option.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Option.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/OptionDescription.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/OptionDescription.kt similarity index 80% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/OptionDescription.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/OptionDescription.kt index ee7f2e9..8a43e59 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/OptionDescription.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/OptionDescription.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Participant.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Participant.kt similarity index 88% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Participant.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Participant.kt index 220a823..97961dc 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Participant.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Participant.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * Information about a session participant. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantId.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantId.kt similarity index 76% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantId.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantId.kt index 7ebf53c..3a71044 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantId.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantId.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * A unique identifier for a session participant. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantTracks.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantTracks.kt similarity index 82% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantTracks.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantTracks.kt index 7aa5c78..6032ff1 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ParticipantTracks.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ParticipantTracks.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * Media tracks associated with a participant. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetrics.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetrics.kt similarity index 88% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetrics.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetrics.kt index cd19415..911fa3a 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetrics.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetrics.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetricsData.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetricsData.kt similarity index 86% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetricsData.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetricsData.kt index e26ba53..c1f5ece 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/PipecatMetricsData.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/PipecatMetricsData.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/RTVIURLEndpoints.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/RTVIURLEndpoints.kt similarity index 76% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/RTVIURLEndpoints.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/RTVIURLEndpoints.kt index ce07bd5..c3192a8 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/RTVIURLEndpoints.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/RTVIURLEndpoints.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types data class RTVIURLEndpoints( val connect: String = "/connect", diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/RegisteredHelper.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/RegisteredHelper.kt similarity index 57% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/RegisteredHelper.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/RegisteredHelper.kt index 76be9db..00993e7 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/RegisteredHelper.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/RegisteredHelper.kt @@ -1,6 +1,6 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types -import ai.rtvi.client.helper.RTVIClientHelper +import ai.pipecat.client.helper.RTVIClientHelper internal class RegisteredHelper( val helper: RTVIClientHelper, diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfig.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfig.kt similarity index 81% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfig.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfig.kt index 4e9cfa8..05406af 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfig.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfig.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfigDescription.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfigDescription.kt similarity index 83% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfigDescription.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfigDescription.kt index 593eb8d..4f0e21d 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceConfigDescription.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceConfigDescription.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceRegistration.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceRegistration.kt similarity index 81% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceRegistration.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceRegistration.kt index 0ff9d34..7e0f978 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/ServiceRegistration.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/ServiceRegistration.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Tracks.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Tracks.kt similarity index 82% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Tracks.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Tracks.kt index d1a66d8..e62d556 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Tracks.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Tracks.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * Media tracks for the local user and remote bot. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Transcript.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Transcript.kt similarity index 90% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Transcript.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Transcript.kt index fa7c8b9..0ea5a75 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Transcript.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Transcript.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/TransportState.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/TransportState.kt similarity index 86% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/TransportState.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/TransportState.kt index 494c10e..8b30ba7 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/TransportState.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/TransportState.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types /** * The current state of the session transport. diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Type.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Type.kt similarity index 90% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Type.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Type.kt index 8d0dd91..79fcaf2 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Type.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Type.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Value.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Value.kt similarity index 99% rename from rtvi-client-android/src/main/java/ai/rtvi/client/types/Value.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/types/Value.kt index b7862a0..81d33a0 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/types/Value.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/types/Value.kt @@ -1,4 +1,4 @@ -package ai.rtvi.client.types +package ai.pipecat.client.types import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.ExperimentalSerializationApi diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/ConnectionBundle.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/ConnectionBundle.kt similarity index 86% rename from rtvi-client-android/src/main/java/ai/rtvi/client/utils/ConnectionBundle.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/utils/ConnectionBundle.kt index 2f6145e..ae1787f 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/ConnectionBundle.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/ConnectionBundle.kt @@ -1,7 +1,7 @@ -package ai.rtvi.client.utils +package ai.pipecat.client.utils -import ai.rtvi.client.types.ServiceConfig -import ai.rtvi.client.types.Value +import ai.pipecat.client.types.ServiceConfig +import ai.pipecat.client.types.Value import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.encodeToJsonElement diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/Http.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/Http.kt similarity index 94% rename from rtvi-client-android/src/main/java/ai/rtvi/client/utils/Http.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/utils/Http.kt index 00897f1..2c5a1ac 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/Http.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/Http.kt @@ -1,8 +1,8 @@ -package ai.rtvi.client.utils +package ai.pipecat.client.utils -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.HttpError -import ai.rtvi.client.result.withPromise +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.HttpError +import ai.pipecat.client.result.withPromise import android.util.Base64 import okhttp3.OkHttpClient import okhttp3.Request diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/Json.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/Json.kt similarity index 84% rename from rtvi-client-android/src/main/java/ai/rtvi/client/utils/Json.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/utils/Json.kt index 3eaa13c..e0b0252 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/Json.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/Json.kt @@ -1,6 +1,6 @@ -package ai.rtvi.client.utils +package ai.pipecat.client.utils -import ai.rtvi.client.types.Value +import ai.pipecat.client.types.Value import kotlinx.serialization.KSerializer import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromJsonElement diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/ThreadRef.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/ThreadRef.kt similarity index 93% rename from rtvi-client-android/src/main/java/ai/rtvi/client/utils/ThreadRef.kt rename to pipecat-client-android/src/main/java/ai/pipecat/client/utils/ThreadRef.kt index f56c209..b32a94b 100644 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/utils/ThreadRef.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/utils/ThreadRef.kt @@ -1,7 +1,7 @@ -package ai.rtvi.client.utils +package ai.pipecat.client.utils -import ai.rtvi.client.result.Future -import ai.rtvi.client.result.withPromise +import ai.pipecat.client.result.Future +import ai.pipecat.client.result.withPromise import android.os.Handler import android.os.Looper diff --git a/rtvi-client-android/src/main/java/ai/rtvi/client/Legacy.kt b/rtvi-client-android/src/main/java/ai/rtvi/client/Legacy.kt deleted file mode 100644 index 5d637b9..0000000 --- a/rtvi-client-android/src/main/java/ai/rtvi/client/Legacy.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ai.rtvi.client - - -@Deprecated("VoiceClient is renamed to RTVIClient") -typealias VoiceClient = RTVIClient - -@Deprecated("VoiceClientOptions is renamed to RTVIClientOptions") -typealias VoiceClientOptions = RTVIClientOptions - -@Deprecated("VoiceEventCallbacks is renamed to RTVIEventCallbacks") -typealias VoiceEventCallbacks = RTVIEventCallbacks diff --git a/settings.gradle.kts b/settings.gradle.kts index 5241a38..328a887 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,5 +19,5 @@ dependencyResolutionManagement { } } -rootProject.name = "RTVI Client" -include(":rtvi-client-android") +rootProject.name = "Pipecat Client" +include(":pipecat-client-android") From 579b570580ace0a1e91cc00783d54670f5bd6b6f Mon Sep 17 00:00:00 2001 From: marcus-daily <111281783+marcus-daily@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:00:43 +0000 Subject: [PATCH 2/5] Fixes --- .../main/java/ai/pipecat/client/PipecatClient.kt | 12 ++++++------ .../java/ai/pipecat/client/helper/LLMHelper.kt | 2 +- .../main/java/ai/pipecat/client/helper/Legacy.kt | 2 +- .../ai/pipecat/client/helper/RTVIClientHelper.kt | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt index a4d7b34..1736c73 100644 --- a/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/PipecatClient.kt @@ -1,7 +1,7 @@ package ai.pipecat.client import ai.pipecat.client.helper.RTVIClientHelper -import ai.pipecat.client.helper.RegisteredRTVIClient +import ai.pipecat.client.helper.RegisteredPipecatClient import ai.pipecat.client.result.Future import ai.pipecat.client.result.Promise import ai.pipecat.client.result.RTVIError @@ -101,12 +101,12 @@ open class PipecatClient( private val transportCtx = object : TransportContext { override val options - get() = this@RTVIClient.options + get() = this@PipecatClient.options override val callbacks - get() = this@RTVIClient.callbacks + get() = this@PipecatClient.callbacks - override val thread = this@RTVIClient.thread + override val thread = this@PipecatClient.thread override fun onMessage(msg: MsgServerToClient) = thread.runOnThread { @@ -117,7 +117,7 @@ open class PipecatClient( val data = JSON_INSTANCE.decodeFromJsonElement(msg.data) - this@RTVIClient.transport.setState(TransportState.Ready) + this@PipecatClient.transport.setState(TransportState.Ready) connection?.ready?.resolveOk(Unit) @@ -345,7 +345,7 @@ open class PipecatClient( throw RTVIException(RTVIError.OtherError("Helper targeting service '$service' already registered")) } - helper.registerVoiceClient(RegisteredRTVIClient(this, service)) + helper.registerVoiceClient(RegisteredPipecatClient(this, service)) val entry = RegisteredHelper( helper = helper, diff --git a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt index 089f560..da4a256 100644 --- a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/LLMHelper.kt @@ -205,7 +205,7 @@ private fun Value.asJsonElement(): JsonElement = when (this) { Value.Null -> JsonNull } -private fun RegisteredRTVIClient.ensureReady(action: () -> Future): Future = +private fun RegisteredPipecatClient.ensureReady(action: () -> Future): Future = if (client.state == TransportState.Ready) { action() } else { diff --git a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt index 1c9b478..aabe057 100644 --- a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/Legacy.kt @@ -4,4 +4,4 @@ package ai.pipecat.client.helper typealias VoiceClientHelper = RTVIClientHelper @Deprecated("RegisteredVoiceClient renamed to RegisteredRTVIClient") -typealias RegisteredVoiceClient = RegisteredRTVIClient \ No newline at end of file +typealias RegisteredVoiceClient = RegisteredPipecatClient \ No newline at end of file diff --git a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt index 6344b8f..a800775 100644 --- a/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt +++ b/pipecat-client-android/src/main/java/ai/pipecat/client/helper/RTVIClientHelper.kt @@ -1,6 +1,6 @@ package ai.pipecat.client.helper -import ai.pipecat.client.RTVIClient +import ai.pipecat.client.PipecatClient import ai.pipecat.client.result.Future import ai.pipecat.client.result.RTVIError import ai.pipecat.client.result.RTVIException @@ -12,10 +12,10 @@ import java.util.concurrent.atomic.AtomicReference abstract class RTVIClientHelper { - private val voiceClient = AtomicReference(null) + private val voiceClient = AtomicReference(null) protected fun withClient( - action: (RegisteredRTVIClient) -> Future + action: (RegisteredPipecatClient) -> Future ): Future { val client = voiceClient.get() ?: return resolvedPromiseErr( @@ -26,7 +26,7 @@ abstract class RTVIClientHelper { return client.client.thread.runOnThreadReturningFuture { action(client) } } - protected val client: RegisteredRTVIClient? + protected val client: RegisteredPipecatClient? get() = voiceClient.get() /** @@ -41,7 +41,7 @@ abstract class RTVIClientHelper { abstract fun getMessageTypes(): Set @Throws(RTVIException::class) - internal fun registerVoiceClient(client: RegisteredRTVIClient) { + internal fun registerVoiceClient(client: RegisteredPipecatClient) { if (!this.voiceClient.compareAndSet(null, client)) { throw RTVIException(RTVIError.OtherError("Helper is already registered to a client")) } @@ -55,8 +55,8 @@ abstract class RTVIClientHelper { } } -class RegisteredRTVIClient( - val client: RTVIClient, +class RegisteredPipecatClient( + val client: PipecatClient, val service: String, ) { fun action(action: String, args: List