internetarchive / internetarchive/bookreader

Buffer soundmanager audio files in TTS plugin

Open
#143 1 comment 0 reactions 0 assignees View on GitHub
difficulty: advanced read-aloud (tts)
Dominant language
JavaScript
Stars
1.2k
Forks
491
Avg merge
2d 15h
Merged PRs (30d)
3

Description

**Context**
Currently, after each chunk is read, TTS is stopped while the next audio chunk is loaded in. We should buffer these chunks so there is no pause.

**Proposal & Constraints**
- We can't call `.load()` on 2 soundmanager instances simultaneously because of mobile browser restrictions, but maybe we can `ajax` request the audio file, convert it to a `base64`, and then pass it into SM's `createSound` method as a url.

**Additional Resources**
- https://github.com/internetarchive/bookreader/pull/140/commits/ad6a36608cdf0a987df4db63472f3b94f726139a This removed buffering because of mobile browser restrictions
- http://www.schillmania.com/projects/soundmanager2/doc/technotes/#mobile-device-limitations
- http://www.schillmania.com/projects/soundmanager2/doc/

**Success Metrics**
- There is no pause between page chunks.

**Stakeholders**
@shaneriley

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.