A Practical Guide to Personalized Voice Generation with Large Models

    This article explains how to move from fixed voice libraries to natural-language voice description, covering the four dimensions of controllable speech, a five-layer pipeline, structured parsing, prompt design, evaluation, performance and cost control, and safety governance. It also lists common pitfalls and a phased rollout path for building a reproducible and compliant custom voice system.

    1. Background: From Picking a Voice to Describing a Voice

    Early voice interaction products typically relied on a fixed voice library: developers picked one from a handful of preset voices, and users had no choice but to accept it. This approach is simple to implement and easy to control, but it has clear limitations—limited voice options, homogeneous styles, no coverage of regional accents or personal expression preferences, and little room for product differentiation.

    Recent industry explorations have pushed the interaction model one step further. Instead of choosing from a list, users describe the voice characteristics they want in natural language, for example “warm and low-pitched, with a regional accent, a slower pace, relaxed but not overly enthusiastic.” The model parses the description and generates the corresponding voice performance. A random generation entry is also kept, so users without a clear preference can quickly get a usable voice.

    From an engineering perspective, this turns the “voice selection” problem into a “controlled generation plus structured parameter parsing” problem. The latter has a longer technology stack, spanning natural language understanding, acoustic parameter mapping, speech synthesis, quality evaluation, and governance auditing. A missing link in any of these stages makes the output uncontrollable.

    2. Requirements: Four Dimensions of Controllable Speech

    Once the business requirements are abstracted, controllable speech capability can be summarized in four dimensions. Together they form the input contract for all subsequent design:

    • Accent and language variant: determines the phoneme set, prosody habits, and pronunciation habits, and is the biggest factor in whether a voice “sounds local.”
    • Pitch: affects perceived gender, perceived age, and emotional color, and must be constrained to a valid range to avoid unnatural listening experiences.
    • Rate and pauses: affect information density and intelligibility, with different impacts on long-text reading and real-time conversation.
    • Expression style: includes emotional intensity, warmth, and formality. These are high-level semantic constraints that must be decomposed into computable low-level parameter combinations.

    The key engineering judgment is that high-level descriptions must be translated into low-level parameters and constraints rather than handed to the generation model to improvise. Otherwise, the same description will produce completely different results at different times, making it impossible to reproduce or regression-test.

    3. Overall Architecture: A Five-Layer Pipeline

    A deployable custom voice solution usually consists of five layers, connected by well-defined data structures:

    1. Description parsing layer: receives natural-language descriptions and outputs a structured acoustic configuration.
    2. Constraint validation layer: checks the configuration for validity, boundaries, and conflicts.
    3. Speech generation layer: synthesizes speech based on the configuration and supports streaming output.
    4. Evaluation feedback layer: performs objective metrics and subjective sampling evaluation on the generated results.
    5. Governance auditing layer: records the original description, configuration snapshots, and generated audio fingerprints to meet traceability requirements.

    The second layer is the most easily overlooked, yet it is central to stability and compliance. User descriptions are naturally contradictory—for example, “very fast yet calm and relaxed”—and the validation layer must apply a deterministic handling strategy instead of making a random tradeoff.

    4. Description Parsing and Structured Modeling

    The goal of the parsing layer is to map free text to a typed configuration object. An illustrative structure is shown below (it expresses field semantics only and is not a specific platform interface):

    1. {
    2. "language": "en-GB",
    3. "accent": "regional_variant",
    4. "pitch": { "min": 0.85, "max": 1.0 },
    5. "rate": { "words_per_minute": 130 },
    6. "style": { "warmth": 0.7, "energy": 0.4, "formality": 0.5 },
    7. "constraints": ["no_exaggeration"],
    8. "seed": 20240611
    9. }

    There are three design points. First, numeric fields must have upper and lower bounds. When a parsing result exceeds the bounds, clamp it to the boundary and log a warning instead of throwing an error and aborting. Second, style semantics require predefined dimensions and quantification methods. Once dimension definitions are released, they should remain backward compatible, and new dimensions should be added as optional fields. Third, fix the random seed so that the same description produces stable results under the same version—this is the prerequisite for reproducibility.

    For mapping style dimensions to acoustic parameters, it is recommended to maintain an explicit mapping table under version control rather than scattering the mapping logic across prompts:

    1. warmth ↑ -> pitch slightly lower, rate slightly lower, falling sentence endings
    2. energy ↑ -> rate slightly higher, more prominent stress, shorter pauses
    3. formality ↑ -> more regular pauses, fewer colloquial liaisons

    5. Prompt Design and the Random Entry

    If a generative approach is used for style control, the prompt should contain four fixed sections: target language and accent, acoustic ranges, style and emotional intensity, and prohibited items. The prohibited items are critical, as they significantly reduce common degradations such as “overly enthusiastic” or “exaggerated broadcast tone.” Example:

    1. Language: English (regional variant, neutral)
    2. Prosody: pitch slightly low, rate ~130 wpm, gentle falling intonation
    3. Style: warm, relaxed, moderately informal
    4. Avoid: exaggerated emphasis, overly enthusiastic tone, fast rate

    In engineering terms, the “random generation” entry should not be truly unconstrained randomness. It should sample from a compliant candidate set: pre-generate a batch of configurations that have passed validation and evaluation, randomly return one of them along with a human-readable description, and let users fine-tune from there. This preserves the sense of surprise while preventing low-quality results from being exposed directly to users.

    6. Evaluation: Objective Metrics and Subjective Sampling

    The biggest risk of custom voice is quality variance. It is recommended to build two types of evaluation at the same time:

    • Objective metrics: synthesis success rate, first-packet latency, real-time factor, phoneme error rate, and configuration consistency (whether parameters are identical under the same description and seed).
    • Subjective evaluation: MOS naturalness scores, accent fit, style match, and intelligibility, using small-sample manual spot checks plus explicit user feedback (such as “doesn’t sound right” or “too fast”).

    Evaluation results need to flow back into the mapping table and validation rules to form a closed loop. Every time the mapping or prompt template is adjusted, run a fixed regression set and compare metric changes to prevent “fixing one scenario and breaking three others.”

    7. Performance and Cost Control

    Real-time conversation and long-text reading have different latency requirements and should be given separate budgets. Common techniques include streaming synthesis with playback while generating, sentence-level splitting with parallel synthesis, caching results for high-frequency descriptions, and routing by configuration complexity to models of different sizes. For cost control, set an upper limit on description length, cap the number of style dimensions, and monitor cache hit rate with alerts.

    If large-scale audio and configuration data need to be stored and distributed, a combination of general cloud capabilities can be used—for example, object storage for audio artifacts, a message queue for peak shaving, a container platform for elastic inference services, and logging plus monitoring and alerting for observability. Selection should be based on your own traffic characteristics and compliance requirements, avoiding lock-in to a single implementation.

    8. Security, Compliance, and Governance

    Voice personalization involves voiceprint and identity-related risks, so hard rules are required: prohibit descriptions based on real people’s identities, prohibit cloning a specific individual’s voice, run content safety checks on description text, and retain generated audio fingerprints for traceability and takedown. All original descriptions, configuration snapshots, model versions, and random seeds should be archived together to ensure that any historical result can be reproduced, explained, and withdrawn. Scenarios involving minors should default to stricter style and content policies.

    9. Common Pitfalls and Implementation Advice

    • Doing parsing without validation, which makes production results uncontrollable.
    • Changing style dimension definitions frequently, which breaks compatibility with historical configurations.
    • Ignoring the fixed seed, which makes problems impossible to reproduce and renders regression testing ineffective.
    • A random entry without candidate-set constraints, which exposes low-quality results directly to users.
    • Evaluating only naturalness while ignoring accent and style match, so metrics look good but the business sees no benefit.

    A three-step rollout is recommended: first, launch structured configuration with a small number of dimensions and get the parsing, validation, and evaluation loop working; then introduce natural-language descriptions and version the mapping table; finally, add the random entry, caching, and tiered routing. Baidu AI Cloud typically organizes general voice-related capabilities into four categories—recognition, synthesis, content safety, and observability—which can serve as a capability reference for a self-built solution, with the actual implementation still guided by your own evaluation results.