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): keep the Speak draft when changing run location

debpalashdfd2445d4ff5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 35310fbd7..a655b5359 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,11 @@ metadata and the backend fallback mirror it.
### Fixed
+- Speak keeps your script when switching between the phone and computer on Android (#2969)
+- Phone dubbing no longer speaks the wrong words when a quiet reference clip is not recognised (#2969)
+- 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)
+- Phone video dubbing uses a supported AAC bitrate and preserves playable audio, rotation and synthetic-audio metadata (#2969)
- Phone dub playback restores sound after dictation on iOS and keeps the video visible when switching results on Android (#2969)
- Stereo reference files and dictation inputs keep both channels when converted to mono on iOS (#2969)
- Android dubbing errors remain visible when worker updates arrive while their receipt is being saved (#3031)
@@ -278,12 +283,6 @@ metadata and the backend fallback mirror it.
### Fixed
-- Phone dubbing no longer speaks the wrong words when a quiet reference clip is not recognised (#2969)
-- 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)
-
-- Phone video dubbing uses a supported AAC bitrate and preserves playable audio, rotation and synthetic-audio metadata (#2969)
- macOS builds without a Developer ID are now signed ad hoc so the bundle signature is valid, and the shell installer clears quarantine, repairs an invalid signature of older releases, names an unreadable disk image, and tells Intel Mac users the backend needs Apple Silicon (#3033, #2763, #2829, #2681)
- A "Generation failed" log line now says where it was raised and which error caused it, and the out-of-memory advice mentions picking another GPU, so these reports can be told apart (#2895, #2684, #2666, #2626, #2622, #2580, #3034)
@@ -291,11 +290,9 @@ metadata and the backend fallback mirror it.
- Interactive release helper: pick stable or beta, draft or publish, and confirm by typing the tag (`scripts/release.py`) (#3187)
- Release helper choices are arrow-key menus (#3190)
-- New `mobile-release` workflow builds signed Android and iOS apps and drafts a GitHub prerelease with the APK, AAB and IPAs, (#2969)
- Desktop request-guard self-tests stay deterministic when app requests arrive during cleanup (#2676)
- New `mobile` workflow builds and tests both phone apps; a contract test fails when their theme or API description drifts from the desktop app (#2965)
-- The `mobile` workflow builds the pinned on-device runtimes for both apps (#2969)
- iOS TestFlight workflow: maintainers can upload a signed iPhone build for internal testers from `main` ([guide](docs/mobile.md#testflight-maintainers)) (#3188)
- Android Play internal testing workflow: the matching signed Android upload from `main`, and beta versions no longer break the Android build ([guide](docs/mobile.md#play-internal-testing-maintainers)) (#3189)
diff --git a/docs/mobile.md b/docs/mobile.md
index 0de81d2b0..42e91926f 100644
--- a/docs/mobile.md
+++ b/docs/mobile.md
@@ -17,6 +17,7 @@ choose, per task, to run on **This phone** or **My computer**.
## What you can do
- **Speak**: type text, pick a voice and language, generate, play, share.
+ Switching between the phone and computer keeps your script.
- **Voices**: clone a voice from a recording or an audio file. Voices you
clone on the phone stay on the phone.
Stereo recordings use audio from both channels.
diff --git a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
index 068c9a52e..9a131f18b 100644
--- a/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
+++ b/mobile/android/app/src/test/kotlin/com/voicestudio/mobile/HostSwitchRegressionTest.kt
@@ -79,6 +79,19 @@ class HostSwitchRegressionTest {
var request=b.takeRequest(10,TimeUnit.MILLISECONDS)
while(request!=null) {assertFalse(request.path.orEmpty().contains("host-a"));request=b.takeRequest(10,TimeUnit.MILLISECONDS)}
}
+ @Test fun changingRunLocationPreservesTheSharedSpeakScript() = runBlocking<Unit> {
+ vm.connect(a.url("/").toString(),"","");awaitIdle()
+ compose.setContent {StudioApp(vm)}
+ compose.onNodeWithTag("home.speak").performScrollTo().performClick()
+ compose.onNodeWithText("Type what you want to hear…").performTextInput("Draft from computer")
+ compose.onNodeWithText("This phone").performClick()
+ compose.onNode(hasSetTextAction() and hasText("Draft from computer")).assertExists()
+ compose.onNode(hasSetTextAction()).performTextReplacement("Edited on phone")
+ compose.onNodeWithText("Computer").performClick()
+ compose.onNode(hasSetTextAction() and hasText("Edited on phone")).assertExists()
+ compose.onNodeWithText("This phone").performClick()
+ compose.onNode(hasSetTextAction() and hasText("Edited on phone")).assertExists()
+ }
@Test fun reconnectAndDisconnectClearCheckpointsAndStopOldMonitoring() = runBlocking {
vm.connect(a.url("/").toString(),"","");awaitIdle()
val oldHost=a.url("/").toString()
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
index d65650243..006c3739c 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/speak/SpeakScreen.kt
@@ -17,11 +17,10 @@ import com.voicestudio.mobile.features.*
import java.io.File
import kotlinx.coroutines.*
-@Composable private fun ComputerSpeakScreen(vm:StudioViewModel, initialVoiceID: String? = null) {
+@Composable private fun ComputerSpeakScreen(vm:StudioViewModel, text: String, onTextChange: (String)->Unit, initialVoiceID: String? = null) {
val state by vm.state.collectAsState()
val context=LocalContext.current
val scope=rememberCoroutineScope()
- var text by rememberSaveable {mutableStateOf("")}
var voice by rememberSaveable(initialVoiceID) {mutableStateOf(initialVoiceID.orEmpty())}
var engine by rememberSaveable {mutableStateOf("")}
var language by rememberSaveable {mutableStateOf("Auto")}
@@ -44,7 +43,7 @@ import kotlinx.coroutines.*
}
Screen {
ScreenTitle("mobile.tabs.speak")
- Field("mobile.speak.placeholder",text,{text=it},multiline=true)
+ Field("mobile.speak.placeholder",text,onTextChange,multiline=true)
if(catalog==null) InlineLoading()
Row(Modifier.fillMaxWidth(),horizontalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
Box(Modifier.weight(1f)) {ChoicePicker("mobile.speak.voice",voice,listOf(Choice("",tr("mobile.simple.default_voice")))+state.profiles.map {Choice(it.id,it.name)},compact=true) {voice=it}}
@@ -88,13 +87,13 @@ internal fun chooseSpeakModel(models: List<PhoneModel>,installed: Set<String>,ch
}
@Composable fun SpeakScreen(vm: StudioViewModel, initialPhoneVoiceID: String? = null, initialComputerVoiceID: String? = null) {
+ var text by rememberSaveable {mutableStateOf("")}
com.voicestudio.mobile.features.models.TaskLocation(vm,"speak",setOf("tts","clone")) {location,model ->
- if(location==com.voicestudio.mobile.local.RunLocation.COMPUTER) ComputerSpeakScreen(vm,initialComputerVoiceID)
+ if(location==com.voicestudio.mobile.local.RunLocation.COMPUTER) ComputerSpeakScreen(vm,text,{text=it},initialComputerVoiceID)
else {
val phone by vm.phone.state.collectAsState()
val context=LocalContext.current
val scope=rememberCoroutineScope()
- var text by rememberSaveable {mutableStateOf("")}
var speaker by rememberSaveable(initialPhoneVoiceID) {mutableStateOf(initialPhoneVoiceID?.let {"phone:"+it} ?: "0")}
val voice=phone.voices.firstOrNull {"phone:"+it.id==speaker}
val capability=if(voice==null) "tts" else "clone"