Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

fix(android): template string keys for the contract test, keep QR pairing explicit, await the async speak preference in the phone-voice test

debpalashb0cb46aa1472
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f98ac5eae..8476cfca4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,7 +27,7 @@ metadata and the backend fallback mirror it.
- Contributor guides and the pull request template explain how to sign the CLA before opening a first pull request (#2676)
### Fixed
--- Phone dubbing no longer speaks the wrong words when a quiet reference clip is not recognised, and Android pairing connects right after a QR scan
+-- Phone dubbing no longer speaks the wrong words when a quiet reference clip is not recognised
Refined iOS navigation, voice libraries, grouped creation forms and licence sheets with native controls, accessible text and explicit cancellation. (#2969)
- Phone apps open on an Electron-style Home dashboard with shared artwork, workspace shortcuts, recent audio, saved voices and resumable dubbing projects (#2969)
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
index a08b575cf..b133a35bc 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/PhoneVoiceUiTest.kt
@@ -55,6 +55,8 @@ class PhoneVoiceUiTest {
compose.onNode(hasText("Home") and hasClickAction()).performClick()
compose.onNodeWithText("New name").performScrollTo().performClick()
compose.onNodeWithText("New name").assertExists()
+ // The preference is persisted asynchronously; wait for it instead of racing the IO dispatcher.
+ await {vm.preferences.value.runLocations["speak"]=="phone"}
org.junit.Assert.assertEquals("phone",vm.preferences.value.runLocations["speak"])
compose.onNode(hasText("Voices") and hasClickAction()).performClick()
compose.onNodeWithContentDescription("More actions for New name").performScrollTo().performClick()
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
index d56990370..e4d9bbd01 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/connect/ConnectScreen.kt
@@ -25,7 +25,7 @@ import java.util.Date
ScreenTitle("mobile.connect.title")
Action("mobile.connect.scan_qr",!state.busy,onClick=camera)
if(scanner) scanContent({raw ->
- try {val address=PairingAddress.parse(raw);url=address.baseUrl.toString();pin=address.pin.orEmpty();scanner=false;manual=true;vm.connect(url,pin,"")}
+ try {val address=PairingAddress.parse(raw);url=address.baseUrl.toString();pin=address.pin.orEmpty();scanner=false;manual=true}
catch(e:Exception) {scanner=false;vm.fail(e)}
},{scanner=false},{scanner=false;vm.fail(it)})
Secondary("mobile.simple.address") {manual=!manual}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
index fa3db8beb..042f0fa20 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/models/ModelsScreen.kt
@@ -85,11 +85,11 @@ import com.voicestudio.mobile.local.*
val uri=androidx.compose.ui.platform.LocalUriHandler.current
var showTerms by remember(model.id) {mutableStateOf(false)}
Text(model.name,style=MaterialTheme.typography.titleLarge)
- Text(tr("mobile.local.category."+model.licence.category),style=MaterialTheme.typography.titleSmall,color=role(if(model.licence.category=="commercial-ok") "text" else "textMuted"))
+ Text(tr("mobile.local.category.${model.licence.category}"),style=MaterialTheme.typography.titleSmall,color=role(if(model.licence.category=="commercial-ok") "text" else "textMuted"))
review.rights.forEach {(key,status) ->
Row(Modifier.fillMaxWidth(),horizontalArrangement=Arrangement.SpaceBetween) {
- Text(tr("mobile.local.right_"+key))
- Text(tr("mobile.local.right_"+status),color=role(if(status=="restricted") "error" else "textMuted"))
+ Text(tr("mobile.local.right_$key"))
+ Text(tr("mobile.local.right_$status"),color=role(if(status=="restricted") "error" else "textMuted"))
}
}
review.notes?.let {Text(it,style=MaterialTheme.typography.bodyMedium)}