Self-hosted speech synthesis: voice cloning with Coqui TTS

Robotic voiceover and failures during peak hours are a familiar pain for services that are growing. We set up speech synthesis with Coqui TTS and turnkey voice cloning: we train a model on your recordings, deploy it on your hardware, and hand it over to your team with operational guidelines. The timbre remains recognizable, and response stays steady under any volume of requests.

AI Development Areas

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1359
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Why speech synthesis on Coqui TTS breaks under load

In pilot mode, the system voices smoothly: one voice, a few dozen requests per minute, playback latency is imperceptible to the ear.

As soon as it grows to simultaneous requests, speech synthesis on Coqui TTS starts responding in bursts: the first fragment arrives later and later, short phrases slip through, and long ones fail by client-side timeout. Voice quality itself does not change — throughput breaks.

The cause is not the model, but how it is launched. Voice cloning adds a separate step to ordinary synthesis: you need to compute and retain the speaker representation, and this step cannot be cached indefinitely — there are many voices, and requests to them come in waves.

Each process holds the weights in memory entirely and processes requests sequentially, so voice latency grows not linearly but in steps: until the previous phrase is fully computed, the next waits in queue.

A separate trap is streaming requests. The client expects the first fragment within fractions of a second, while by default synthesis computes the entire phrase and only then returns audio.

Under peak load, the queue grows faster than new service instances warm up, and timeouts cut off precisely long lines — the ones where voice is needed most. In logs this looks like a failure rate; to the ear, like fragments of phrases.

This is not a library defect, but an architecture question: where to compute the speaker representation, how to slice the stream into fragments, what to keep in cache, and how to limit the queue before it starts overwhelming the service. We explain how this is addressed.

What local speech synthesis provides: response and timbre stability

Local speech synthesis removes the external provider from the chain: the voice is computed on your capacity, so response time and timbre stop depending on someone else's queue and limits.

A model based on Coqui TTS is deployed in a closed loop — audio and voice samples do not leave your infrastructure.

During acceptance, we look not at a showcase demonstration but at stable numbers. We record them before work starts, then "it got better" becomes a verifiable result:

  • Response time. A short line is voiced in fractions of a second; long text is streamed while the reader is still on the first paragraph. We look not at the average but at the tail of the distribution: what matters is not the record but the absence of failures at peak.
  • Timbre stability. We run the same text in different sessions and at different lengths: timbre, tempo, and pause placement match, the voice does not "drift" toward the end of a long fragment.
  • Share of failed requests. We keep timeouts, interruptions, and re-synthesis below the threshold agreed at the start. We analyze each case by cause rather than attributing it to "peak load."
  • Server load. A separate queue with a limit on parallel tasks and model warm-up instead of cold start — synthesis does not crowd out the main application.
  • Independence from an external service. No external limits, changed terms, or sudden quality drops: voice models and updates live in your loop.

We verify these properties on your real request stream — typical phrases, long texts, peak hours.

Custom model or external service: comparison on Coqui TTS

The choice between a custom model and an external voice service is rarely ideological. It comes down to three questions: where voice samples may be stored, who is responsible for latency and availability during peak hours, and how deeply the synthesis mode needs to be controlled.

In Coqui TTS, the synthesis mode, set of voices, and cloning rules are set on our side — this is exactly what determines where to deploy the model. Below are the options that are actually chosen between at project start.

When what fits

Option When it fits Limitations
Custom model in a closed loop Voice recordings must not leave the infrastructure, you need your own timbre and control over pronunciation Dedicated capacity with an accelerator, training and model updates — on our side
Custom model on rented capacity You need control over voice and quality, but do not have your own hardware Dependence on the lessor: availability, deployment region, update policy
External voice service Fast start, rare short requests, many languages without your own infrastructure Recordings go to a third party, billing by volume, fine timbre tuning unavailable
Hybrid Your own loop for sensitive scenarios, external service as backup during peaks Two integrations and risk of divergence in the sound of the same voice

The limitations of a solution usually outweigh the speed of start: a retroactive migration means rebuilding the integration, re-recording samples, and tuning timbre from scratch.

Therefore the option is selected for a specific scenario — describe the task, and we will come back with an assessment and plan.

Implementation stages: from recording audit to model handover

The implementation stages are arranged so that synthesis quality is predictable rather than dependent on luck with an individual sample.

First we check what a voice can even be assembled from, then we build the scheme, train the model, and after acceptance hand the solution over to the customer's team.

  1. Speaker recording audit. We listen to the material and label it: share of clean fragments, background noise, overloads, different distances to the microphone, slips of the tongue, and duplicates. The output is a suitability map: what goes into training, what needs restoration, what is rejected.
  2. Requirements alignment. We fix where the voice will sound — telephony, web, recorded clips — and what is critical: names, terms, numbers, abbreviations. We agree on test scenarios before training, not after.
  3. Corpus preparation. Segmentation by phrases, aligning text with audio, loudness normalization, removal of pauses and artifacts — the timbre directly depends on the cleanliness of this layer, with an individual assessment Model training. We set up training on Coqui TTS, monitor convergence and ensure that the timbre does not "drift" on long phrases. We listen to intermediate results, not just look at metrics.
  4. Synthesis quality check. We evaluate intelligibility, naturalness of intonation, voice stability on long texts, and pronunciation of proper names. Separately — generation speed, so the solution can withstand real load.
  5. Solution handover. We provide configurations, model weights, retraining instructions, and an analysis of limitations, and train the customer's engineers.

Implementation artifacts: models, dictionaries, regulations

The project ends not with a demonstration of a cloned voice but with a set of artifacts that your team can work with independently.

Below is what exactly remains with the customer: this is enough to deploy the synthesis loop on your own equipment, update the voice and dictionary, and not contact the contractor for every change.

We check each item at acceptance: deploy the loop on a clean machine, synthesize a control set of phrases, and compare it with the reference. If startup and sound match without our edits, the artifact is handed over.

  • Configured synthesis loop: Coqui TTS with trained weights for your voice, configuration, an invocation endpoint from your services, and load limits.
  • Pronunciation dictionary: phoneme markup, stresses, homographs, abbreviations, names, and numerals — edits are made without retraining the model.
  • Reference speaker recordings and consent protocol: where they are stored, who has access, what is permitted to do with the voice.
  • Loop diagram: the path of text to finished audio, external dependencies, bottlenecks, and rules for switching to a backup voice.
  • Operations regulations: how to update weights and the dictionary, how to control synthesis quality, what to do during degradation, and how to restore from a copy.
  • Documentation: description of invocation points with examples, model passport, change log, and common errors with solutions.
  • Set of test phrases with expected sound: run after any update so regression is caught before rollout.

Case study: eliminated voice failures during peak hours

What it was

The client is a voice call and reference voice service.

During quiet hours everything worked, but during peak hours, when simultaneous requests became five times higher, speech synthesis queued up: a response to a line stretched from fractions of a second to two or three, and 7% of requests were interrupted by waiting timeout and went to retry.

A separate problem was voice inconsistency. Synthesis ran on several nodes with different sets of settings, so the same phrase sounded either faster or lower: 12% of lines did not pass acceptance for tone and tempo.

What we did and what came out of it

We moved synthesis to Coqui TTS in the customer's closed loop and assembled a single voice profile from the speaker's recordings, fixing its version — planned model updates no longer change the timbre.

We split the queue by priority: short service lines do not wait for long ones, and repeating greetings and menus are served from the buffer. We keep models warm, so the first request after a pause is processed as quickly as the hundredth.

Implementation result: share of failed requests — 0.4% instead of 7%, response to the first line — about half a second instead of more than two, and voice divergence between nodes disappeared. The service handles peak load five times higher than before on the same fleet of machines.

How does voice cloning differ from style transfer?

Voice cloning reproduces the timbre of a specific speaker: the model is trained on recordings of one person and then voices arbitrary text in that voice.

Style transfer preserves the source timbre but changes the manner — tempo, intonation, emotional coloring, placement of pauses and accents.

The difference is heard immediately: in the first case, the customer gets "that very" speaker, in the second — a familiar voice in a new delivery.

Data requirements differ in the same way. Cloning needs clean material from one person: even reading tempo, absence of reverberation and background noise, a single manner — usually from ten minutes of speech.

Style transfer needs comparable examples where the same phrase is spoken differently, so the corpus volume and markup are noticeably higher. We choose the approach before collecting data: redoing the corpus is more expensive than pausing at the preparation stage.

Approach What we get Data requirements Applicability boundaries
Voice cloning A new voice speaking any text 10–30 minutes of clean speech from one speaker The speaker is unavailable, a "brand voice" is needed
Style transfer The same voice with a different delivery Labeled pairs "neutral / desired style" The voice exists, an emotion or another manner is needed

We check quality by blind listening: native speakers evaluate naturalness and the number of stress errors before the solution goes to production.

On Coqui TTS, such runs are set up in a local loop, without sending the speaker's recordings outside — for voices under a usage agreement, this is a mandatory condition.

If there is little data or the style is not described with examples, neither approach will give a stable result — it is more honest to expand the corpus than to promise "emotions from five seconds of recording." Describe the task: we will say which approach covers it and what needs to be prepared.

Technical doubts: quality, rights, updates

Technical customers' objections are usually the same: the voice sounds synthetic, there are few recordings and they are noisy, voice rights are unclear, and updating the model supposedly requires stopping the service.

All of them are resolved at the stage of data preparation and delivery organization, not with promises to "improve later."

We work on the open Coqui TTS stack in your loop: audio does not leave the infrastructure, and the voice is retrained on your recordings.

Will synthesis quality sound like a "robot"?

Quality is determined not by the model but by the corpus: uniform loudness, careful cutting, pause markup. We clean recordings and discard fragments with overlapping speech — intonation stops "drifting" on long phrases.

Will there be enough recordings, and what to do about noise?

We work with what there is: noise reduction, normalization, filtering out duplicates. Half an hour of clean speech yields a recognizable timbre; for confident intonation, a larger corpus is needed — we agree on volume and composition in advance.

Who owns the cloned voice?

We clone only with the speaker's written consent: we fix the scope of rights, term, revocation procedure, and storage of references. Access to voice samples is restricted by roles.

How to update the model without stopping the service?

The new version is assembled alongside, run through a control set of phrases, and switched on live traffic. The previous one remains in place — rollback takes minutes.

Let's discuss the task: data review and implementation plan

To discuss the task substantively and move to the implementation plan, we need to understand what exactly to voice, with which voice, and in what volume.

At the start, we review examples, assess the quality of the source speaker recordings, and determine whether the selected configuration can handle the required load.

After that, we come back with an assessment of work and an implementation plan by stages — without generic promises.

What we request from the customer before work starts:

  • Voice examples — 10-20 fragments of how the result should sound: intonation, tempo, pauses, accents on terms.
  • Speaker recordings — clean sound without echo and background noise, 15-30 minutes of speech in a single manner.
  • Voice scenarios — where the voice is used: lines in an app, audio guide, synthesis of long materials. The model choice depends on this.
  • Load requirements — how many requests at peak, permissible response latency, whether streaming synthesis is needed or a finished file is enough.
  • Terminology and pronunciation — abbreviations, names, mixed texts that the model must read correctly.
  • Loop constraints — where Coqui TTS runs: customer's closed network, own servers, isolated loop.
  • Voice rights — the speaker's written consent to cloning and use of the recording in the product.

Based on this data, we assemble an implementation plan: data preparation and markup, model training and tuning, integration, runs on your scenarios.

The work estimate relies on measurements, not assumptions — therefore we clarify the load profile and recording quality before the start.