Introducing a new way to review your PRs.

Read the announcement

debpalash / voicestudio

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

View on GitHub

26 documents · Updated Nov 23, 2026

docs / desktop-automation-workflows

Desktop workflow automation

Desktop workflow automation lets the Electron renderer save a reusable graph of VoiceStudio tasks, bind text or audio input to that graph, and run each item with visible progress and resumable results. It gives users a local workflow surface without replacing the speech, transcription, translation, or audio services described in Speech platform integration. It is a child workspace of the Electron desktop application, complements the wider Electron workspace interface, and sits beside related desktop automation surfaces such as the desktop agent browser.

Workflow library

The workflow library is the user’s set of saved task graphs. A workflow is a named document with steps and links between them. The canvas is for designing and saving the graph; it does not run a step by itself.

Workflow documents

Each document has a stable unique identity, a name, editable steps, and connections. The library keeps one active document and supports new workflows, copies, starter recipes, renaming, and deletion. Starter recipes cover speech batches, audio processing, localization, and call preparation so an engineer can see the intended task shape before adding custom steps.

The document model keeps display layout separate from executable settings. Moving a node or changing its label changes the saved design, but it does not change the work that a matching run has already completed. A condition step adds a controlled yes/no route to the graph. An agent or call step remains a local draft or handoff concept rather than a task that the workflow runner executes.

The library surface also exposes the state that matters to a user: the active workflow name, save status, duplicate and delete actions, and a clear setup warning when a required step setting is missing. This keeps document management separate from task execution.

References: electron/…/workflow-model.ts• L3-45 electron/…/workflow-model.ts• L68-120 electron/…/workflow-title-bar.tsx• L6-18 electron/…/workflows-page.tsx• L138-171 electron/…/workflow-model.test.ts• L17-49

Workflow persistence

The renderer stores the workflow library in browser storage and keeps run records and imported audio in a separate local store. This split lets the canvas reopen quickly while larger audio and completed outputs remain available to the run panel. Saved data is treated as untrusted: invalid steps or links are discarded, and an unreadable library becomes a usable new workflow instead of blocking the workspace.

The library autosaves document changes. When a workflow is copied, source audio can remain shared. The renderer releases that audio only after the last workflow reference is gone. It records removed media and runs in a cleanup queue so a storage error does not lose the deletion work. A workflow deletion first removes its saved run, then removes the document from the library.

The saved-library parser also preserves large libraries and graphs without silently cutting their documents, steps, or connections. It repairs automatically generated names when the saved language changes while leaving custom names unchanged. When saved connections point to missing steps, it drops only those broken connections and keeps the rest of the workflow usable.

References: electron/…/use-workflow-library.ts• L14-24 electron/…/use-workflow-library.ts• L32-63 electron/…/workflow-model.ts• L123-272 electron/…/workflow-model.ts• L434-447 electron/…/workflow-delete-dialog.tsx• L16-45 electron/…/workflow-run-store.ts• L3-23 electron/…/workflow-run-store.ts• L40-63 electron/…/workflow-model.test.ts• L51-133 electron/…/workflow-model.test.ts• L146-151

Input binding

Input binding connects a workflow’s input step to the material that the later steps will process. Text workflows use one or more scripts. Media workflows use imported audio clips. The same graph can therefore apply one task chain to a batch of independent items.

Text and media inputs

The start of a text workflow accepts direct text or imported script files. Direct text uses a line containing --- as the separator between items. Each imported audio file becomes one item in an audio workflow. The workflow keeps source names so the run panel can show which clip or script produced each result.

Input limits protect the renderer and the local store. A workflow accepts at most 50 input items, each script is bounded in size, and each imported audio file has a bounded size. These limits apply before execution, so a run cannot start with only part of an invalid batch.

References: electron/…/workflow-inputs.tsx• L59-85 electron/…/workflow-inputs.tsx• L102-128 electron/…/workflow-runtime.ts• L136-143

Step settings

Step settings bind reusable VoiceStudio choices to a task. Speech and voice-conversion steps use a saved voice profile with language and speed controls. Translation uses source and target languages plus a local provider. Normalization uses a target level. Transcription reads the source audio and lets the service detect its language. A condition uses a phrase and a match mode to choose its route.

The inspector owns these settings while the canvas shows a short summary. It also shows the first setup issue for the selected step and provides the handoff action for a call draft. This relationship keeps the graph readable while making missing run inputs visible before execution.

References: electron/…/workflow-inputs.tsx• L27-58 electron/…/workflow-inputs.tsx• L87-100 electron/…/workflow-inspector.tsx• L14-45 electron/…/workflow-inspector.tsx• L63-110 electron/…/workflows-page.tsx• L388-399

Operation orchestration

Operation orchestration turns an editable graph into a safe, typed task plan. The compiler checks the whole graph before it allows any service call. The executor then applies the plan to each input item and records every useful intermediate result.

Execution graph

Executable workflows have one input step and one end step. They can use a linear path or a condition with exactly two labeled routes. Each path must reach the end, and routes that join must carry the same kind of value so a shared tail receives a stable input type.

The supported task chain is:

  • Text to speech through a selected voice.
  • Audio transcription to text.
  • Text translation between explicit languages.
  • Audio voice conversion through a selected voice.
  • Audio normalization after generated speech or converted audio.
  • Text conditions that route each item by phrase match.

Call, agent, and other draft nodes are useful design or handoff concepts, but they are not execution steps in this runner. A call draft opens the call workspace with its phone number and brief. It does not dial as part of a workflow run.

The canvas makes the graph rules visible. The step palette groups input, task, draft, and end steps. A new step can be placed on the canvas or added after a selected step when that step has a free output. A condition exposes separate yes and no connection points.

This diagram shows how input type and a condition control the operations that can follow an item.

flowchart LR
    Text[Text scripts] --> Speak[Speak]
    Text --> Condition{Condition}
    Audio[Audio clips] --> Transcribe[Transcribe]
    Audio --> Convert[Convert voice]
    Transcribe --> Translate[Translate]
    Translate --> Speak
    Condition -->|yes| Yes[Text branch]
    Condition -->|no| No[Text branch]
    Speak --> Normalize[Normalize audio]
    Convert --> Normalize
    Speak --> End[Completed output]
    Normalize --> End
    Translate --> TextOut[Completed text]
    Transcribe --> TextOut
    Yes --> End
    No --> End

References: electron/…/workflow-runtime.ts• L38-161 electron/…/workflow-branching.test.ts• L49-184 electron/…/workflow-runtime.test.ts• L95-160 electron/…/workflow-setup.test.ts• L14-53 electron/…/workflow-step-palette.tsx• L7-20 electron/…/workflow-step-node.tsx• L72-117 electron/…/workflows-page.tsx• L263-327

Branch evaluation

A condition compares the text that reaches it with its configured phrase. The match can check containment, equality, a starting phrase, or an ending phrase. The comparison ignores case and surrounding spaces, so the same input takes the same route on each machine.

Each input item evaluates the condition on its own. A single run can therefore send different scripts down different routes. A route can join another route only when both carry the same value type, and the shared tail runs once for each item that reaches it.

References: electron/…/workflow-runtime.ts• L40-57 electron/…/workflow-runtime.ts• L97-111 electron/…/workflow-runtime.ts• L205-219 electron/…/workflow-branching.test.ts• L62-120

Service operations

The operation layer maps each executable step to an existing VoiceStudio service. Speech generation uses the selected voice and speech controls. Transcription checks local recognition readiness before sending audio. Translation sends one segment through the chosen local provider. Conversion retrieves the local audio artifact returned by the conversion service. Normalization sends the current audio to the audio tool.

The runner passes an abort signal to each operation. A service result must contain usable text or non-empty audio before the executor stores it as a successful checkpoint. This keeps an incomplete service response from looking like a valid workflow output. Translation failures remain failures even when the service returns the original source text, and conversion accepts only the local audio route.

References: electron/…/workflow-operations.ts• L15-21 electron/…/workflow-operations.ts• L23-89 electron/…/workflow-operations.test.ts• L17-106 electron/…/workflow-runtime.ts• L172-179 electron/…/workflow-runtime.ts• L220-245

Run state

Run state describes the progress of each script or audio clip independently. It gives the renderer enough information to show queued, active, completed, failed, or cancelled work and to resume without repeating successful operations.

Checkpoints and resume

Before inference starts, the runner saves a run record. After source loading and after each operation, it saves the current text, audio, step, and state. Execution is serial so model loads and local service work do not compete across items.

If one item fails, the executor stops rather than silently skipping it. A retry reuses completed checkpoints for that item and then continues from the failed step. Cancellation keeps completed work and marks the active item as cancelled. A later run can resume that work when the executable plan still matches. For a branched plan, resume uses the checkpointed text to take the same condition route again.

The reuse signature contains input scripts, execution settings, condition rules, and graph wiring. It excludes names and canvas positions, but includes values such as voice, speed, languages, provider, normalization level, match phrase, and match mode. Changing an executable value or route invalidates old results; renaming or moving a node does not.

References: electron/…/workflow-runtime.ts• L4-35 electron/…/workflow-runtime.ts• L144-169 electron/…/workflow-runtime.ts• L205-257 electron/…/workflow-branching.test.ts• L88-103 electron/…/workflow-branching.test.ts• L208-243

Local run storage

Run records are keyed by workflow identity and validated when read. They contain text checkpoints and audio blobs for completed steps. Source media uses the same local store with a separate key space, so a workflow can survive a page reload before its first run.

Storage is part of the run contract. If the first checkpoint cannot be saved, the runner does not start expensive inference. If a later save fails, the run reports the storage error instead of claiming that recovery is available.

References: electron/…/workflow-run-store.ts• L25-53 electron/…/workflow-runner.tsx• L49-65 electron/…/workflow-runtime.test.ts• L68-80

Execution interface

The execution interface joins the graph editor and the run panel in one renderer workspace. The editor collects the graph and its settings. The run panel validates the graph, waits for required engine information, starts or cancels the run, and presents each result for review or export.

Canvas editor

The canvas is the main design surface. A left rail lists saved workflows and starter recipes. A step palette adds input, task, draft, and end steps. The center canvas shows nodes and links. Selecting a node opens an inspector for its name, input, voice, language, media, condition, or task settings.

When a workflow opens, the canvas frames all measured steps in view and keeps short workflows near the top of the work area. This gives the graph a stable reading position without changing its saved layout.

The editor marks incomplete steps on the node and in the inspector. The same setup rules block Run and guide the user to the first missing setting. The editor disables graph changes while a run is active so the executing plan cannot drift under the user.

Templates provide speech, speech with normalization, transcription, conversion, localization, and call preparation starting points. Call preparation switches to the call workspace with the draft phone number and brief; the workflow itself remains a non-dialing design.

Speech-only runs can show a text-to-speech readiness notice. Audio-only transcription does not require a working text-to-speech engine, which lets the workflow surface match the service actually used by the plan.

References: electron/…/workflow-step-palette.tsx• L10-20 electron/…/workflow-template-picker.tsx• L25-95 electron/…/workflow-step-node.tsx• L39-69 electron/…/workflow-inspector.tsx• L63-110 electron/…/workflow-title-bar.tsx• L35-90 electron/…/workflows-page.tsx• L177-410 electron/…/workflow-fit.tsx• L11-37 electron/…/workflows.css• L27-41 electron/…/workflows.css• L283-347

Run panel

The run panel shows validation and service errors before execution, then reports completed items against the total input count. Each item can show its current step, failure message, text result, audio player, and export control. The panel offers run, retry, restart, and cancel actions. It marks a saved active item as cancelled if the view closes during work.

Text and audio outputs use safe names derived from the workflow and item names. This makes exported files usable across desktop platforms without letting workflow text create path separators or control characters.

References: electron/…/workflow-runner.tsx• L41-106 electron/…/workflow-runtime.ts• L263-268 electron/…/workflows.css• L319-347

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep graph validation rules aligned with the operation map. A new executable step must have a data type contract, a service operation, an input editor, and a visible runner state before it can execute.
  • Keep condition handles aligned across the canvas, compiler, branch map, and run signature. A missing or renamed yes/no route must fail before inference rather than select a route at run time.
  • Keep the setup warning contract aligned across stepSetupIssue, the canvas node, the inspector, and the Run control. A new required setting must be both visible and blocking.
  • Keep the run signature aligned with every setting and connection that changes service output. If a setting or route is omitted, an old result can be shown for new work.
  • Keep workflow storage cleanup aligned with duplication, deletion, and the autosave queue. Shared source media must stay until its last workflow reference is removed, and a failed cleanup must remain retryable.
  • Keep readiness checks aligned with the plan. ASR-only workflows must not become dependent on TTS readiness, while speech and conversion workflows must not start without their required engine state.
  • Keep output naming rules aligned with export targets. Workflow and item names can contain characters that desktop file systems reject.
  • Keep saved-library parsing aligned with workflow identity, generated names, graph links, and cleanup entries. A change that accepts or rejects saved data can alter which workflows and shared media survive reload.

Important failure modes

TriggerConsequenceGuard
A graph has a cycle, an incomplete condition fork, a disconnected step, or a path without an endThe run is rejected before any service callWhole-graph compilation in compileWorkflow
A condition receives audio or has no phrase to testThe route cannot be evaluated safelyCondition type and phrase validation
A merge receives different value types from its branchesA shared tail could process text as audio or audio as textValue-type agreement during graph compilation
A text or audio type reaches an incompatible stepThe workflow could create a false or synthetic resultExplicit type checks for transcription, translation, speech, conversion, and normalization
A required voice, language, media file, or local model is missingThe affected run cannot produce a valid outputCanvas setup warnings, compile-time validation, and operation readiness checks
A service returns empty text, empty audio, or an unsafe remote audio URLAn incomplete or untrusted artifact could be savedResult checks and local audio-route validation
A checkpoint write fails before inferenceExpensive work could run without a recoverable runInitial checkpoint is saved before execution
A later step failsEarlier successful work could be lost or silently skippedPer-step checkpoints and stop-on-failure retry
A copied workflow still shares source mediaDeleting one workflow could break the otherReference-aware cleanup queue
Run storage cleanup fails during deletionThe workflow is removed while old run or media data remains pendingAtomic cleanup queue and retry action
Saved graph data contains a connection to a missing stepA damaged link could block the whole library or create an invalid graphSaved-library parsing drops broken connections and keeps valid data

Key files

FileWhy to read it
electron/…/workflow-model.tsDefines workflow documents, step kinds, condition branches, starter recipes, setup checks, saved-library recovery, and reference cleanup decisions.
electron/…/use-workflow-library.tsCoordinates autosave, locale-safe names, and retryable cleanup for removed workflow data.
electron/…/workflow-inputs.tsxShows how text, scripts, audio, voices, languages, condition rules, and audio settings bind to selected steps.
electron/…/workflow-runtime.tsDefines graph compilation, value-type rules, branch evaluation, run signatures, checkpoints, resume behavior, and serial execution.
electron/…/workflow-model.test.tsStates the contracts for workflow identity, saved-library recovery, generated names, graph preservation, and shared-media cleanup.
electron/…/workflow-setup.test.tsStates the contract between per-step setup warnings and graph compilation.
electron/…/workflow-branching.test.tsStates the safety contract for per-item routing, branch joins, condition matching, and route-aware resume.
electron/…/workflow-operations.tsMaps executable workflow steps to VoiceStudio speech, audio, transcription, translation, and conversion services.
electron/…/workflow-operations.test.tsProtects service contracts for local readiness, translation providers, and safe audio results.
electron/…/workflow-run-store.tsDefines local persistence for run records, source media, and deferred cleanup.
electron/…/workflows-page.tsxConnects the workflow library, template picker, palette, canvas, inspector, calls handoff, and run-panel entry point.
electron/…/workflow-step-node.tsxDefines the node summaries, setup warnings, and condition handles shown on the canvas.
electron/…/workflow-step-palette.tsxDefines how users add or drag step kinds into the graph.
electron/…/workflow-template-picker.tsxDefines the starter workflow groups and their initial graph shapes.
electron/…/workflow-inspector.tsxDefines step editing, setup feedback, deletion, and call preparation from the selected node.
electron/…/workflow-title-bar.tsxDefines save status, run blocking, rename, duplicate, and delete controls.
electron/…/workflow-delete-dialog.tsxDefines the confirmed deletion boundary for saved workflow runs.
electron/…/workflow-fit.tsxDefines the opening canvas view so the workflow graph is visible and starts near the top.
electron/…/workflows.cssShows the workspace layout and the desktop and narrow-window behavior of the canvas, inspector, and run panel.
electron/…/workflow-execution-smoke.mjsCovers end-to-end workflow execution, checkpoint resume, audio input survival, typed processing, export, and cleanup.