mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-04 01:28:51 +01:00
🔈 fix(tts): update min value for playback rate (#2880)
* 🔈 fix: update min value for playback rate in TTS component
* fix: prevent playbackRate from being set if less than or equal to 0
This commit is contained in:
parent
b80f38e49e
commit
eb5733083e
4 changed files with 10 additions and 4 deletions
|
|
@ -193,6 +193,7 @@ export default function StreamAudio({ index = 0 }) {
|
|||
if (
|
||||
playbackRate &&
|
||||
globalAudioURL &&
|
||||
playbackRate > 0 &&
|
||||
audioRef.current &&
|
||||
audioRef.current.playbackRate !== playbackRate
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,12 @@ export default function MessageAudio({ index, message, isLast }: THoverButtons)
|
|||
if (!messageAudio) {
|
||||
return;
|
||||
}
|
||||
if (playbackRate && messageAudio && messageAudio.playbackRate !== playbackRate) {
|
||||
if (
|
||||
playbackRate &&
|
||||
playbackRate > 0 &&
|
||||
messageAudio &&
|
||||
messageAudio.playbackRate !== playbackRate
|
||||
) {
|
||||
messageAudio.playbackRate = playbackRate;
|
||||
}
|
||||
}, [audioRef, isSpeaking, playbackRate, message.messageId]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue