A pronunciation reference can contain a spelling even when no recording is available for it. Representing those as separate facts makes the inventory easier to maintain and the interface easier to explain.
This example uses the inventory from Chinese Alphabet, a Mandarin pronunciation reference I maintain. The relevant interface is its pinyin chart.
Different counts answer different questions
The reference inventory contains:
| Measure | Count |
|---|---|
| Standard Mandarin syllable spellings | 408 |
| Spellings with recordings | 407 |
| Individual recordings | 1,663 |
| Initials | 21 |
| Finals | 37 |
These figures describe different units.
An individual spelling can have multiple recordings, so the recording total does not tell us how many spellings have audio. Likewise, listing a spelling does not establish that every tone combination has a recording.
Separate spellings from recordings
A conceptual model can distinguish:
- Spelling: the written syllable represented in the reference.
- Tone combination: a spelling associated with a tone.
- Recording: an audio item associated with a pronunciation.
- Source and permissions: information attached to the recording.
The following is an illustrative design example, not production application code:
const spellingEntry = { spelling: "yo", recordings: [], note: "No recording is available for this spelling." }; An empty recording list should not automatically remove the spelling from the reference.
In the supplied inventory, yo is the only spelling without a recording. Its fourth-tone use is largely absent from modern Mandarin. Keeping the entry visible allows the interface to explain that gap.
Calculate each measure explicitly
For spelling coverage, count distinct spelling entries.
For audio coverage, count spelling entries with at least one recording.
For the recording total, count audio items.
An illustrative implementation could look like this:
function summariseInventory(entries) { const spellingCount = entries.length; const spellingsWithAudio = entries.filter( entry => entry.recordings.length > 0 ).length; const recordingCount = entries.reduce( (total, entry) => total + entry.recordings.length, 0 ); return { spellingCount, spellingsWithAudio, recordingCount }; } This example assumes that each spelling appears once and that each recording belongs to one entry. Those assumptions need validation before the totals can be trusted.
The interface labels should preserve the same distinctions. “Recordings available for 407 spellings” communicates a different fact from “1,663 recordings.”
Keep source and permission information together
The collection contains 1,300 synthetic male recordings and 363 human recordings.
Combining them in one interface should preserve their source and permission information.
The recording permissions are:
1,300 CC0 recordings allow commercial use without attribution; 363 CC BY-SA recordings require attribution.
The human recording attribution is Chen Wang.
These permissions describe the audio collections. They do not establish a licence for application code, illustrations, or every other website asset.
Evaluate server rendering and audio delivery separately
The reference uses server rendering. A reason to choose that approach is to put the reference text into the initial HTML document.
That is a design rationale, not a measured performance result. Audio availability and playback still need separate checks.
Compression also needs its own evaluation. A proposed review process would compare source recordings with candidate delivery encodings, listening for clipped consonant onsets and changes in perceived tone contours.
No compression ratio, uniform codec choice, or measured saving is established by this example.
Distinguish missing audio from playback failures
A useful interface can distinguish these states:
- No recording exists for an entry.
- A recording exists, but loading failed.
- A recording loaded, but playback could not start.
Each state calls for a different response. An unavailable recording needs an explanation. A loading failure may need a retry.
The broader modelling lesson is to define what each count measures, preserve meaningful gaps, and avoid using one convenient total to answer several different questions.
Case-study reference
The interface discussed here is the Chinese Alphabet pinyin chart. Its separate Mandarin tone reference provides context for the pronunciation terminology.
Disclosure: This article was prepared with AI assistance using the project's supplied inventory. The schema and JavaScript are illustrative design examples, not production implementation claims.