~alcinnz/rhapsode

bf572743cd38f3b4ea5881e7a6473c087bc60356 — Ariana Giroux 3 years ago d165a15
Added initial CSS API docs to CSS-Speech-Tutorial

- Adds new initial technical reference for the mentioned CSS properties.

  For example, usage of properties to vary voice articulation now
  include a full list of valid arguments, as well as a simple usage
  explanation.

- Adds new "**Wanted:**" tag to solicit further expansion on technical
  documentation.

- Adds new "**Wanted:**" tag to a few of the technical reference
  sections.

  I am not a proficient user of Haskell, and cannot discern a few of the
  valid keywords or syntax simply by reading through the code.

- Also makes a title more clear in CSS-Speech-Tutorial.md
1 files changed, 93 insertions(+), 1 deletions(-)

M docs/CSS-Speech-Tutorial.md
M docs/CSS-Speech-Tutorial.md => docs/CSS-Speech-Tutorial.md +93 -1
@@ 1,5 1,7 @@
**Wanted:** Guidance on creating a great audio theme. Maybe based on voice acting
or public speaking theory.
**Wanted:** Written descriptions of the various outcomes of properties. I.e,
how does `speak-as: spell-out` differ from normal.

Rhapsode still lets you apply CSS styles to your webpages, but since it outputs
audio rather than video it supports a different set of CSS properties. This page


@@ 14,11 16,40 @@ Setting `speak: never` is not the same as setting `voice-volume: silent` as the
latter still takes up the same ammount of time as it would've to read the text
aloud.

### Reference:
#### `speak`
Usage:
  `speak: always`

Valid Options:
  - `always`
  - `never`

#### `speak-as`
Usage:
  `speak-as: spell-out`

Valid options:
  - `spell-out`
  - `digits`
  - `literal-punctuation`
  - `no-punctuation`

## The Voice
You can use the `voice-family` attribute to select a voice either by age/gender/variant
or by it's name. Just like font-family this'll make a big difference to the "look"
of your page.

### Reference
**Wanted: denote syntax and properly format list**
#### `voice-family`
Usage:
  `voice-family: OPTIONS`

- genders: male female neutral
- ages: child young old


## Speaking Style
You can alter the voice you choose by varying it's volume, rate, pitch, range,
and stress. Doing so helps people pay attention, especially if it reinforces the


@@ 29,7 60,54 @@ All the speaking style properties provide keywords you can use instead of a
number. In which case write a number after a keyword to represent an offset from
that keyword.

## The CSS Speech "Box Model"
### Reference
#### `voice-volume`
Usage:
  `voice-volume: medium -10dB`

Valid keywords:
  - `silent`
  - `x-soft`
  - `soft`
  - `medium`
  - `loud`
  - `x-loud`
  - `medium`

#### `voice-rate`
Usage:
  `voice-rate: medium -10%`

Valid keywords:
  - `x-slow`
  - `slow`
  - `medium`
  - `fast`
  - `x-fast`

#### `voice-pitch`
Usage:
  `voice-pitch: medium +10%`

Valid keywords:
  - `x-low`
  - `low`
  - `medium`
  - `high`
  - `x-high`


#### `voice-stress`
Usage:
  `voice-stress: moderate`

Valid keywords:
  - `strong`
  - `moderate`
  - `none`
  - `reduced`

## Rests, Pauses, and Auditory Cues
On either end of your text you can place an audio cue to identify it, and on
either end of those you can insert additional silence. If two silences are
directly adjacent, the smaller one will be removed.


@@ 40,6 118,20 @@ it's `pause`.
The user agent stylesheet, for example, uses audio cues to indicate list bullets
and links. And silence functions exactly like whitespace in a visual browser.


### Reference
> Note: `pause` and `rest` mirror functionality
> Note: `-before` and `-after` are both offered by the api as well
#### `pause`
Usage:
  `pause: before weak 50ms`

Valid keywords:
  - `x-weak`
  - `weak`
  - `medium`
  - `strong

## Text Generation
Rhapsode supports (some of) the same text generation attributes as visual
browsers, namely: