Module

Web.Speech.TTS.Utterance

Package
purescript-web-speech
Repository
dirkz/purescript-web-speech

#PitchRateVolume Source

type PitchRateVolume = { pitch :: Number, rate :: Number, volume :: Number }

Pitch, rate and volume for an utterance.

  • Pitch: Between 0 (lowest) and 2 (highest), with 1 being the default pitch for the current platform or voice.
  • Rate: Note that the documentation looks suspicious, and rateMax has been set to 2.0.
  • Volume: Between 0 (lowest) and 1 (highest), with 1 being the default.

#Utterance Source

#createWithVoiceAndPitch Source

createWithVoiceAndPitch :: Voice -> PitchRateVolume -> String -> Effect Utterance

Creates an utterance with voice, pitch, rate and volume, and text.

#createWithVoiceAndRate Source

createWithVoiceAndRate :: Voice -> Number -> String -> Effect Utterance

Creates an utterance with voice, pitch, rate and volume, and text.

#defaultPitch Source

defaultPitch :: Number

The default pitch.

#defaultPitchRateVolume Source

defaultPitchRateVolume :: PitchRateVolume

The default pitch, rate and volume.

#defaultRate Source

defaultRate :: Number

The default rate.

#defaultVolume Source

defaultVolume :: Number

The default volume.

#pitchMax Source

pitchMax :: Number

The maximum pitch.

#pitchMin Source

pitchMin :: Number

The minimum pitch.

#rateMax Source

rateMax :: Number

Note that this is capped to 2.0. Even though the documentation says 10.0 is possible, I don't think this makes any sense, since even with 2.0 the voice is very fast, and I doesn't accept changes above 3.0 or 4.0 anyways and falls back to 1.0. See Rate.

#rateMin Source

rateMin :: Number

The minimum rate.

#volumeMax Source

volumeMax :: Number

The maximum volume.

#volumeMin Source

volumeMin :: Number

The minimum volume.