Skip to content

Commit

Permalink
Merge pull request #951 from AI4Bharat/temp_wfp
Browse files Browse the repository at this point in the history
  • Loading branch information
ishvindersethi22 authored Feb 29, 2024
2 parents b030e21 + 58bd381 commit 9ce1ac4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const AllAudioTranscriptionLandingPage = () => {
const getNextTask = useSelector((state) => state.getnextProject?.data);
const [advancedWaveformSettings, setAdvancedWaveformSettings] = useState(false);
const [assignedUsers, setAssignedUsers] = useState(null);
const [waveSurfer, setWaveSurfer] = useState(true);

const handleCollapseClick = () => {
!showNotes && setShowStdTranscript(false);
Expand Down Expand Up @@ -111,7 +112,12 @@ const AllAudioTranscriptionLandingPage = () => {
variant: "error",
});
} else {
setTaskData(resp)
setTaskData(resp);
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}
}
setLoading(false);
};
Expand Down Expand Up @@ -334,7 +340,6 @@ const AllAudioTranscriptionLandingPage = () => {
})
}, [wave, waveColor, backgroundColor, paddingColor, cursor, cursorColor, progress, progressColor, grid, gridColor, ruler, rulerColor, scrollbar, scrollbarColor, rulerAtTop, scrollable, duration, padding, pixelRatio, waveScale, waveSize, wavWorker]);

const [waveSurfer, setWaveSurfer] = useState(true);
const [waveSurferHeight, setWaveSurferHeigth] = useState(140);
const [waveSurferMinPxPerSec, setWaveSurferMinPxPerSec] = useState(100);
const [waveSurferWaveColor, setWaveSurferWaveColor] = useState('#ff4e00');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const AudioTranscriptionLandingPage = () => {
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);

// useEffect(() => {
// let intervalId;
Expand Down Expand Up @@ -286,7 +287,12 @@ const AudioTranscriptionLandingPage = () => {
variant: "error",
});
} else {
setTaskData(resp)
setTaskData(resp);
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}
}
setLoading(false);
};
Expand Down Expand Up @@ -793,7 +799,6 @@ useEffect(() => {
})
}, [wave, waveColor, backgroundColor, paddingColor, cursor, cursorColor, progress, progressColor, grid, gridColor, ruler, rulerColor, scrollbar, scrollbarColor, rulerAtTop, scrollable, duration, padding, pixelRatio, waveScale, waveSize, wavWorker]);

const [waveSurfer, setWaveSurfer] = useState(true);
const [waveSurferHeight, setWaveSurferHeigth] = useState(140);
const [waveSurferMinPxPerSec, setWaveSurferMinPxPerSec] = useState(100);
const [waveSurferWaveColor, setWaveSurferWaveColor] = useState('#ff4e00');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const ReviewAudioTranscriptionLandingPage = () => {
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);

// useEffect(() => {
// let intervalId;
Expand Down Expand Up @@ -302,7 +303,12 @@ const ReviewAudioTranscriptionLandingPage = () => {
message: "Audio Server is down, please try after sometime",
variant: "error",
});
}else(setTaskDetailList(resp))
}else{setTaskDetailList(resp);
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}}
setLoading(false);
};

Expand Down Expand Up @@ -990,7 +996,6 @@ useEffect(() => {
})
}, [wave, waveColor, backgroundColor, paddingColor, cursor, cursorColor, progress, progressColor, grid, gridColor, ruler, rulerColor, scrollbar, scrollbarColor, rulerAtTop, scrollable, duration, padding, pixelRatio, waveScale, waveSize, wavWorker]);

const [waveSurfer, setWaveSurfer] = useState(true);
const [waveSurferHeight, setWaveSurferHeigth] = useState(140);
const [waveSurferMinPxPerSec, setWaveSurferMinPxPerSec] = useState(100);
const [waveSurferWaveColor, setWaveSurferWaveColor] = useState('#ff4e00');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const SuperCheckerAudioTranscriptionLandingPage = () => {
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);

// useEffect(() => {
// let intervalId;
Expand Down Expand Up @@ -223,7 +224,12 @@ const SuperCheckerAudioTranscriptionLandingPage = () => {
message: "Audio Server is down, please try after sometime",
variant: "error",
});
}else{setTaskDetailList(resp)}
}else{setTaskDetailList(resp);
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}}
setLoading(false);
};

Expand Down Expand Up @@ -838,7 +844,6 @@ useEffect(() => {
})
}, [wave, waveColor, backgroundColor, paddingColor, cursor, cursorColor, progress, progressColor, grid, gridColor, ruler, rulerColor, scrollbar, scrollbarColor, rulerAtTop, scrollable, duration, padding, pixelRatio, waveScale, waveSize, wavWorker]);

const [waveSurfer, setWaveSurfer] = useState(true);
const [waveSurferHeight, setWaveSurferHeigth] = useState(140);
const [waveSurferMinPxPerSec, setWaveSurferMinPxPerSec] = useState(100);
const [waveSurferWaveColor, setWaveSurferWaveColor] = useState('#ff4e00');
Expand Down

0 comments on commit 9ce1ac4

Please sign in to comment.