A plain UTF-8 file is the most portable input format in computing, and also the easiest place for a speech pipeline to quietly go wrong. A stray byte-order mark, a folded line break, or a character count calculated from the wrong units can turn a clean batch into a pile of failed items and a confusing invoice. What follows is an operator-focused path from raw text on disk to downloaded audio, written for the people who actually have to run the job and explain the bill afterwards.
Normalise the Text Before You Think About Voices
Encoding discipline comes first. Read the file as bytes, decode as UTF-8, and strip a leading byte-order mark if one is present — otherwise the first spoken word may be preceded by an invisible character. Convert CRLF and lone CR line endings to LF, normalise to Unicode NFC so composed and decomposed accents deduplicate correctly, and remove the zero-width joiners and non-breaking spaces that survive copy-paste from web pages and PDFs. If a file fails to decode, fail loudly. Decoding with a replacement strategy silently destroys names and placeholders, and you will only notice when the audio comes back with an audible glitch in the middle of a product title.
The second step is measuring the file the way the service measures it. Qwen3-TTS on Y-PAD is billed at $0.0150 per 1,000 characters, with a 500-character minimum per file and a ceiling of 20,000 characters, counted after whitespace is folded. That last detail matters: runs of spaces, tabs and newlines collapse before the count, so padding a short line with whitespace does not buy you anything and does not change what you pay. Punctuation still counts. Build a counter into your preprocessing script and log the folded length for every unit you plan to submit — it is both your chunking signal and your cost forecast. A 480-character file bills at the 500-character floor.
Chunking is where most projects develop opinions. Keep every chunk comfortably under 20,000 characters, split on paragraph boundaries first, then on sentence boundaries, and never split inside a number, a date, a URL or an acronym. Carry headings into the body chunk they introduce so the narrator reads them in context. If you are converting a long document, record the original offset of each chunk in a manifest alongside a deterministic chunk identifier, the chosen voice, the language code and the output format. That manifest is your join key when the audio comes back, and it is the difference between a tidy download folder and an afternoon of guessing.
Voice selection is simpler than most TTS integrations because Qwen3-TTS supports preset voices only — there is no voice cloning and no reference audio to collect, consent to, or store. The available voices are aiden, dylan, eric, ono_anna, ryan, serena, sohee, uncle_fu and vivian, with ryan as the default. Language can be left on auto or pinned to Chinese, English, French, German, Italian, Japanese, Korean, Portuguese, Russian or Spanish. If your corpus is monolingual, pin it: removing one variable from a 2,000-item batch makes every failure you do see more legible. Validate voice codes and format values against a local allowlist before submission rather than discovering typos through failed items.
Submit, Poll, and Download Without Losing Files
Y-PAD issues API keys beginning with op_live_ that are displayed once, so put them in a secret manager before writing any job code. The HTTP base is https://www.y-pad.com and the JSON is shaped like Replicate’s, which means existing client patterns transfer with modest edits. One practical prerequisite: uploads return HTTP 402 until the account has made its first payment, because there is no free storage tier. Budget for the smallest prepaid pack before you attempt a dry run.
Upload links last one hour, a single call accepts up to 100 files, and a batch holds up to 2,000 items. Those three numbers should shape your job layout: stage files in short-lived uploads, then submit in batches sized to the item limit rather than one enormous call. When you wire this up for the first time, the model page for the text to speech api is the authoritative place to confirm the current input schema, voice list and character bounds, since beta details can move. Expect a cold start of roughly 10 to 30 seconds, occasionally minutes, and note that later items in the same batch ride on the same start — so grouping work into fewer, larger batches usually beats firing many tiny ones.
There are no webhooks. You poll. Write a state machine that records each item’s status, backs off between polls, and never resubmits an item that has already succeeded. Only successful items are charged, so a retry of a failed item costs nothing, but a careless resubmit of a completed one is pure waste. Choose the output format deliberately: mp3 is the default and the right choice for delivery, while wav and flac suit downstream editing or mastering. Outputs are retained for seven days, which is long enough to be convenient and short enough to be dangerous — pull them into your own storage promptly, verify sizes or checksums against the manifest, and rename files to your chunk identifiers on arrival. Keep the metadata noting that the files are tagged as AI-generated speech; that tag is part of the asset, not decoration.
Cost Control, Throughput, and Real Operating Scenarios
At the published rate of $0.0150 per 1,000 characters, a 200,000-character corpus works out to roughly $3 before any floor effects, and a million characters to about $15. Y-PAD’s own comparison tables, with competitor prices mostly checked on 2 and 7 November 2026, list Replicate at $0.02 per 1,000 characters and fal at $0.09. Those are published figures tied to specific check dates, and every fare on the platform is marked provisional and limited beta — confirm current numbers on the live pricing page before you quote anything to a client. Note also that the launch-seat discount applies to a named group of models; Qwen3-TTS is priced the same at list and launch, so a seat changes nothing for this workload.
Budgeting needs to account for how funds move, not just the per-unit rate. At submit, Y-PAD holds the sum of maximum units multiplied by list price; at settlement you pay for succeeded units and any unused hold returns to your balance. That means your working capital requirement is the peak hold, not the final bill, and a large batch can briefly look far more expensive than it is. Packs start at $10 for Starter, $25 for Standard and $100 for Bulk, the first payment cannot exceed $25, and for seven days after that first payment the day’s charges plus open holds cannot pass $25. Plan a pilot batch small enough to fit that ceiling.
The 500-character minimum per file shapes workload design more than the headline rate does. Prompt libraries, IVR menus and short product blurbs all pay the floor, so either accept the floor cost or deliberately script short lines into longer, naturally paced segments. Long-form narration, by contrast, is dominated by chunking and joining rather than pricing. Three scenarios recur: e-learning decks where scripted chapters become per-chapter audio files; catalogue readouts where templated text is generated per SKU and spoken in a consistent voice; and accessibility pipelines where documents are first converted from PDF or image into Markdown, then segmented and voiced. In each case the text layer is where quality is won or lost — the synthesis step is the easy part, and the operators who succeed are the ones who verify their character counts, keep deterministic filenames, and download their outputs before the retention window closes.
A Kazakh software architect relocated to Tallinn, Estonia. Timur blogs in concise bursts—think “micro-essays”—on cyber-security, minimalist travel, and Central Asian folklore. He plays classical guitar and rides a foldable bike through Baltic winds.