All projects

Multilingual article-to-audio

Guggiana

An article-to-audio pipeline coordinating translation, speech synthesis, reusable language renditions, and audio assembly.

I designed and built this project independently, using my own resources.

Explore the project

Public repository

Technical documentation

AWS workflow and local speech tooling. Setup and experiment guides are in the repository.

Technologies

  • AWS Step Functions
  • Polly
  • DynamoDB
  • Python
  • TypeScript

01 / Context

The problem behind the project

Publishing an article in several audio languages involves more than calling a speech model: requests can overlap, jobs can fail, and completed renditions should be reusable.

An article can become an accessible audio rendition in several languages, but generating every language for every article wastes translation and synthesis work when most variants are never requested. Guggiana treats each language rendition as a reusable artifact with its own lifecycle.

The project also separates a second question: which speech engine should produce that artifact? Changing providers requires evidence about voice quality, locale support, licensing, and operating cost, rather than replacing a service name in the workflow.

02 / Implementation

Design and implementation

I build the workflow, storage contracts, and speech-provider research behind multilingual audio generation.

I built the TypeScript/CDK workflow around Step Functions, Lambda, DynamoDB, S3, translation, Polly synthesis, and final audio assembly. Article metadata and per-language state connect retrieval to asynchronous processing and stored output.

For lazy renditions, an explicit request grows the article’s requested-language set. A stream-triggered worker claims each missing locale with one conditional DynamoDB write and starts its workflow. Concurrent callers reuse a live claim or an existing artifact instead of starting duplicate synthesis. A failed start releases that locale for retry without affecting other languages.

I added a provider-neutral speech contract and a separate local worker/experiment path. Documents use plain text and explicit pauses; provider adapters own engine-specific markup. Artifacts record model revision, format, duration, locale, and checksum so evaluation and later reuse have a reproducible basis.

03 / Architecture

Architecture and workflow

  1. Request only needed locales

    Resolve a single locale, a subset, or an explicit all-language request without expanding a specific request into unnecessary work.

  2. Claim missing renditions

    Conditional per-locale writes serialize concurrent demand; abandoned claims expire and successful artifacts are reused.

  3. Orchestrate production stages

    Step Functions coordinates article preparation, translation, speech synthesis, callbacks, and final assembly.

  4. Persist reusable artifacts

    DynamoDB tracks progress and S3 holds output. A later request for an existing rendition avoids translation and synthesis.

  5. Evaluate alternative engines separately

    Pinned Chatterbox/Piper/Polly experiments and an optional local worker share a neutral contract without changing the deployed provider.

04 / Approach

Engineering decisions

Generate only the requested languages

Language renditions are created on demand. Atomic claims prevent concurrent callers from duplicating the same translation and synthesis work.

Orchestrate the whole operation

Step Functions coordinates translation, speech synthesis, and audio assembly; S3 stores artifacts and DynamoDB tracks the work.

Evaluate alternative speech providers separately

A provider-neutral speech contract, a multilingual bake-off, and an optional local worker let me investigate Chatterbox and Piper without silently changing the existing Polly workflow.

05 / Evidence

Evidence and outcomes

The lazy-rendition contract identifies cache hits, concurrent reuse, actual workflow starts, and failed starts separately. This measures avoided work against the earlier behavior of launching all five supported languages, without inventing a dollar-saving percentage.

The speech bake-off defines 20 fixtures, explicit evidence states, objective measurements, optional local ASR diagnostics, and a randomized reviewer packet. The local worker has fake-engine lifecycle/protocol checks so retries, cancellation, normalization, and artifact behavior can be verified independently of subjective voice quality.

Source and technical notes

06 / Current scope

Where it stands

The Polly workflow and local synthesis worker remain separate paths. Alternative speech providers are still being evaluated.

The neutral speech contract and local synthesis worker are not yet the deployed Step Functions default. Adopting a different provider remains a separate quality, exact-locale, licensing, and operational decision.

The existing request that omits language selection retains its all-language behavior. Cost avoidance therefore depends on callers making explicit requests; the new code does not reinterpret older clients silently.