markdown-up 5.2.2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/lib/app.js +412 -177
- package/lib/appImports.js +4 -0
- package/lib/scriptLibrary.js +151 -0
- package/lib/voice.js +813 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -105,12 +105,31 @@ block. You can learn more from the
|
|
|
105
105
|
[MarkdownUp backend application's README](https://craigahobbs.github.io/markdown-up-py/#markdownup-applications).
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
## Read Aloud
|
|
109
|
+
|
|
110
|
+
MarkdownUp reads pages aloud with [PicoVox](https://github.com/craigahobbs/picovox#readme) speech
|
|
111
|
+
synthesis, which runs entirely in the browser. To read the page aloud, click "Read aloud" in the
|
|
112
|
+
MarkdownUp menu in the upper-right of the page. The voice playback bar appears at the bottom of the
|
|
113
|
+
window, with play/pause, rewind, skip back and forward by section (the page's top-level headers),
|
|
114
|
+
voice, and speaking rate controls. Code blocks, images, and controls are not read. PicoVox speaks
|
|
115
|
+
English text, and it is loaded when it is first used.
|
|
116
|
+
|
|
117
|
+
MarkdownUp applications read their own Markdown text aloud with the `voiceSpeak`, `voiceSetText`,
|
|
118
|
+
`voiceState`, and `voiceClose` functions. An application positions the voice playback bar by
|
|
119
|
+
rendering an element with the ID "markdownUpVoice" - the bar is rendered in that element.
|
|
120
|
+
|
|
121
|
+
Applications also say lines of text aloud with the `voiceSay` function - each in a voice and a
|
|
122
|
+
speaking style, over any other lines, with no voice playback bar (for example, a film's dialogue).
|
|
123
|
+
`voiceLoad` loads the speech synthesizer ahead of the first line, and `voiceReady` tests whether the
|
|
124
|
+
browser has let the page's audio start (it may not until the user interacts with the page).
|
|
125
|
+
|
|
126
|
+
|
|
108
127
|
## Debug Mode
|
|
109
128
|
|
|
110
129
|
Debug mode logs the script runtime duration and runs the BareScript linter, which performs static
|
|
111
130
|
code analysis on your code and reports warnings for any issues found.
|
|
112
131
|
|
|
113
|
-
To turn on debug mode, click
|
|
132
|
+
To turn on debug mode, click "Debug" in the MarkdownUp menu in the upper-right of the page.
|
|
114
133
|
|
|
115
134
|
|
|
116
135
|
## Development
|