# Dictation (H5P.Dictation)

The learner hears sentences and types them; the content compares what was typed word by word.

- Each item of `sentences` is a recording, `sample`, and the `text` it says. A slower recording can go in `sampleAlternative`.
- Alternative spellings of a word: `colour|color`.
- `behaviour.tries` limits how often a recording plays.

## Example

```json
{
  "type": "H5P.Dictation",
  "params": {
    "taskDescription": "Listen, then write what you hear.",
    "sentences": [
      { "sample": [{ "path": "sentence1.mp3" }], "text": "The river flows to the sea." },
      { "sample": [{ "path": "sentence2.mp3" }], "text": "The bridge is old." }
    ]
  }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.Dictation 1.3

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `media` group — Media
  - `type` sub-content: H5P.Image | H5P.Video | H5P.Audio — Type: Optional media to display above the question.
  - `disableImageZooming` boolean = false; only when type is "H5P.Image 1.1" — Disable image zooming
- `taskDescription` html: strong em u a ul ol h2 h3 hr pre code, required — Task description: Describe your task here.
- `sentences` list 1+ of, required — Sentences
  - `description` text — Description: You can optionally put a simple description above the text input field, useful e.g. for dialogues.
  - `sample` audio files, required — Sound sample
  - `sampleAlternative` audio files — Sound sample slow
  - `text` text, required — Text: Text that should be written. You can add alternate spellings to a word by adding a vertical line (|) behind followed by an alternative.
- `overallFeedback` list 1+ of — Overall Feedback: Click the "Add range" button to add as many ranges as you need. Example: 0-20% Bad score, 21-91% Average Score, 91-100% Great Score!
  - `from` whole number 0–100 = 0 — Score Range
  - `to` whole number 0–100 = 100
  - `feedback` text — Feedback for defined score range
- `behaviour` group — Behavioural settings
  - `tries` whole number 1– — Maximum tries: Will limit the number of times the samples for each sentence can be listened to.
  - `triesAlternative` whole number 1– — Maximum tries for slow speed: Will limit the number of times the slow samples for each sentence can be listened to.
  - `disablePause` boolean = false — Disable pause option
  - `playButtonDelay` whole number 0–3 — Play button delay: Optionally set a time period of up to three seconds that playing a button should be delayed. This is useful if you want to allow students to enter the text field before they star…
  - `shuffleSentences` one of "never" | "once" | "onRetry" = "never" — Shuffle sentences: Define when the sentences should be shuffled.
  - `scoring` group — Scoring
    - `ignorePunctuation` boolean = true — Ignore Punctuation marks
    - `zeroMistakeMode` boolean = false — Zero mistakes mode
    - `typoFactor` one of "100" | "50" | "0" = "100" — Value of typos: Determine to which extent typing errors (word with 3-9 characters: up to 1 mistake, word with more than 9 characters: up to 2 mistakes) count as a real mistake.
  - `textual` group — Text
    - `wordSeparator` text = " " — Word separator: Define the separator of words different than space character to support alternate solutions with different number of words.
    - `overrideRTL` one of "auto" | "on" | "off" = "auto" — Writing direction: Set whether the sentences' language is right-to-left or left-to-right.
    - `autosplit` boolean = true — Splitting of characters
  - `feedbackPresentation` group — Presentation of feedback
    - `customTypoDisplay` boolean = false — Custom typo display
    - `alternateSolution` one of "first" | "all" = "first" — Presentation of alternate solutions: Define which alternatives should be presented for wrong or missing words in the solution.
  - `enableRetry` boolean = true — Enable "Retry"
  - `enableSolutionsButton` boolean = true — Enable "Show solution" button
  - `enableSolutionOnCheck` boolean = false; only when enableSolutionsButton is true — Show solution on check

40 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.Dictation --all` lists them, for a source to set one.

<!-- End of the generated section. -->
