Skip to main content

Config

Mixing are configurable and can be tuned. If you want to adjust these settings, you should provide a config property to useMixing:

const { x } = useMixing({
from: { x: 0 },
config: { rate: 1 },
})
useEffect(() => {
x.start({ config: { volume: 0 } })
x.start({ config: { pitch: 20 } })
}, [])

And we've added the following properties rate, pitch, volume, voice & lang. more

PropertyDefaultDescription
rate1the speed at which the utterance will be spoken at.
pitch1the pitch at which the utterance will be spoken at.
volume1the volume that the utterance will be spoken at.
voice1the voice that will be used to speak the utterance.
langenthe language of the utterance.

Presets#

There are also a couple of generic presets that will cover some common ground.

import { ..., config } from 'react-mixing'
useMixing({ ..., config: config.default })
PropertyValue
config.default{ start: 1, stop: 170, rate: 26 }