chore: support editing the model repoID, filename, model path

This commit is contained in:
jialin
2024-12-10 15:43:29 +08:00
parent acf99a6a9e
commit f64e696f7a
12 changed files with 122 additions and 43 deletions
+14 -1
View File
@@ -64,6 +64,7 @@ const SpeechItem: React.FC<SpeechContentProps> = (props) => {
}, [ref.current]);
const handleOnAnalyse = useCallback((data: any, analyser: any) => {
console.log('data+++++++++++++++++=:', data);
setAudioChunks((pre: any) => {
return {
data: data,
@@ -88,6 +89,7 @@ const SpeechItem: React.FC<SpeechContentProps> = (props) => {
const handleOnAudioprocess = useCallback(
(current: number) => {
console.log('current:', current);
throttleUpdateCurrentTime(current);
},
[throttleUpdateCurrentTime]
@@ -119,7 +121,7 @@ const SpeechItem: React.FC<SpeechContentProps> = (props) => {
};
const handleReady = useCallback((duration: number) => {
console.log('duration:', duration);
console.log('ready+++++++++++++++', duration);
setDuration(duration);
}, []);
@@ -159,6 +161,17 @@ const SpeechItem: React.FC<SpeechContentProps> = (props) => {
onAudioprocess={handleOnAudioprocess}
ref={ref}
></AudioPlayer>
{/* <RawAudioPlayer
{...props}
url={props.audioUrl}
onReady={handleReady}
onEnded={handleOnFinish}
onPlay={handleOnPlay}
onPause={handleOnPause}
onAnalyse={handleOnAnalyse}
onAudioProcess={handleOnAudioprocess}
ref={ref}
></RawAudioPlayer> */}
{isPlay && (
<AudioAnimation
maxBarCount={100}