← Back to Waclaw Says

Creating Content for Waclaw Says

Waclaw Reads supports two content formats: .ws files (single-language, multi-speaker audio scripts) and .xml files (lists of .ws files, like chapters in a book).

Download this guide as Markdown

The .ws Format

A .ws file is a UTF-8 JSON document with this structure:

{
  "version": 1,
  "title": "Chapter Title",
  "language": "en-US",
  "speakers": {
    "id1": { "name": "Speaker Name", "hint": "male" },
    "id2": { "name": "Another Speaker", "hint": "female" }
  },
  "segments": [
    { "speaker": "id1", "text": "First line of dialogue." },
    { "speaker": "id2", "text": "Response." }
  ]
}

Field Reference

FieldTypeDescription
versionintSchema version — must be 1
titlestringDisplay title for the file
languagestringBCP-47 language tag (e.g. en-US, pl-PL)
speakersobjectMap of speaker ID → speaker object. At least one required.
segmentsarrayOrdered list of spoken lines. At least one required.

Speaker Object

FieldTypeDescription
namestringDisplay name shown during playback
hintstringGender hint: male or female. Any other value is rejected.

Segment Object

FieldTypeDescription
speakerstringMust reference a key defined in speakers
textstringThe spoken text. Must be non-empty.

Rules

Tip: Use short speaker IDs like n, a, b for concise files. The display name is what matters to the listener.

The .xml Format

An .xml file is an ordered list of .ws URLs, like chapters in a book:

<?xml version="1.0" encoding="UTF-8"?>
<waclawList version="1">
  <title>My Book Title</title>
  <item>
    <title>Chapter 1</title>
    <url>https://example.com/ch1.ws</url>
  </item>
  <item>
    <title>Chapter 2</title>
    <url>https://example.com/ch2.ws</url>
  </item>
</waclawList>

Rules

Tip: Use relative URLs when your .ws files are on the same server: /ls.ws instead of https://example.com/ls.ws.

Example: Multi-Speaker Story

Here is a short sample .ws file with dialogue between two characters:

{
  "version": 1,
  "title": "A Short Story",
  "language": "en-US",
  "speakers": {
    "alice": { "name": "Alice", "hint": "female" },
    "bob": { "name": "Bob", "hint": "male" }
  },
  "segments": [
    { "speaker": "alice", "text": "Good morning! How are you today?" },
    { "speaker": "bob", "text": "I'm fine, thanks. What did you do yesterday?" },
    { "speaker": "alice", "text": "I went for a walk in the park. The weather was beautiful." },
    { "speaker": "bob", "text": "That sounds lovely. I should get outside more often." }
  ]
}

Language Support

Waclaw Reads uses the device's built-in TTS engine. Available languages depend on what is installed on the user's device. Common BCP-47 tags:

Note: If no suitable voice is available for the file's language, the app falls back to English. If no English voice exists, playback will fail.

Download this guide as Markdown