mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-18 07:35:19 +00:00
voice token not being set bug fix
This commit is contained in:
1 parent
c97574c059
commit
c4a28814d3
1 file changed
+7
-1
@@ -43,7 +43,7 @@ export const GenerateTts = ({
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [jobToken, setJobToken] = useState<string | null>(null);
|
||||
const [isAudioLoading, setIsAudioLoading] = useState(false);
|
||||
const [voiceToken] = useState(
|
||||
const [voiceToken, setVoiceToken] = useState(
|
||||
weightToken || "weight_hz7g8f1j4psrsw2sv67e4y61q"
|
||||
);
|
||||
const [progress, setProgress] = useState(0);
|
||||
@@ -228,6 +228,12 @@ export const GenerateTts = ({
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (weightToken) {
|
||||
setVoiceToken(weightToken);
|
||||
}
|
||||
}, [weightToken]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user