Skip to content

Commit

Permalink
Merge pull request #940 from AI4Bharat/develop
Browse files Browse the repository at this point in the history
Shoonya v2.6.2 Patch
  • Loading branch information
ishvindersethi22 authored Feb 25, 2024
2 parents eae08ce + a889be7 commit b030e21
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ const AllAudioTranscriptionLandingPage = () => {
const [waveSurferBarWidth, setWaveSurferBarWidth] = useState(2);
const [waveSurferBarGap, setWaveSurferBarGap] = useState(0);
const [waveSurferBarRadius, setWaveSurferBarRadius] = useState(0);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(2.2);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(1.5);

const [waveSurferWaveformSettings, setWaveSurferWaveformSettings] = useState({
"height": waveSurferHeight,
Expand Down Expand Up @@ -699,7 +699,7 @@ const AllAudioTranscriptionLandingPage = () => {
position="fixed"
bottom={1}
>
{waveSurfer ? <Timeline2 details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskData?.id} waveformSettings={waveformSettings} />}
{waveSurfer ? <Timeline2 key={taskDetails?.data?.audio_url} details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskData?.id} waveformSettings={waveformSettings} />}
</Grid>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ const [waveSurferCursorWidth, setWaveSurferCursorWidth] = useState(1);
const [waveSurferBarWidth, setWaveSurferBarWidth] = useState(2);
const [waveSurferBarGap, setWaveSurferBarGap] = useState(0);
const [waveSurferBarRadius, setWaveSurferBarRadius] = useState(0);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(2.2);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(1.5);

const [waveSurferWaveformSettings, setWaveSurferWaveformSettings] = useState({
"height": waveSurferHeight,
Expand Down Expand Up @@ -1205,7 +1205,7 @@ useEffect(() => {
bottom={1}
// style={fullscreen ? { visibility: "hidden" } : {}}
>
{waveSurfer ? <Timeline2 details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskData?.id} waveformSettings={waveformSettings}/>}
{waveSurfer ? <Timeline2 key={taskDetails?.data?.audio_url} details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskData?.id} waveformSettings={waveformSettings}/>}
</Grid>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ const [waveSurferCursorWidth, setWaveSurferCursorWidth] = useState(1);
const [waveSurferBarWidth, setWaveSurferBarWidth] = useState(2);
const [waveSurferBarGap, setWaveSurferBarGap] = useState(0);
const [waveSurferBarRadius, setWaveSurferBarRadius] = useState(0);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(2.2);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(1.5);

const [waveSurferWaveformSettings, setWaveSurferWaveformSettings] = useState({
"height": waveSurferHeight,
Expand Down Expand Up @@ -1427,7 +1427,7 @@ useEffect(() => {
bottom={1}
// style={fullscreen ? { visibility: "hidden" } : {}}
>
{waveSurfer ? <Timeline2 details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskDetailList} waveformSettings={waveformSettings}/>}
{waveSurfer ? <Timeline2 key={taskDetails?.data?.audio_url} details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskDetailList} waveformSettings={waveformSettings}/>}
</Grid>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ const [waveSurferCursorWidth, setWaveSurferCursorWidth] = useState(1);
const [waveSurferBarWidth, setWaveSurferBarWidth] = useState(2);
const [waveSurferBarGap, setWaveSurferBarGap] = useState(0);
const [waveSurferBarRadius, setWaveSurferBarRadius] = useState(0);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(2.2);
const [waveSurferBarHeight, setWaveSurferBarHeight] = useState(1.5);

const [waveSurferWaveformSettings, setWaveSurferWaveformSettings] = useState({
"height": waveSurferHeight,
Expand Down Expand Up @@ -1243,7 +1243,7 @@ useEffect(() => {
bottom={1}
// style={fullscreen ? { visibility: "hidden" } : {}}
>
{waveSurfer ? <Timeline2 details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskDetailList} waveformSettings={waveformSettings} />}
{waveSurfer ? <Timeline2 key={taskDetails?.data?.audio_url} details={taskDetails} waveformSettings={waveSurferWaveformSettings}/> : <Timeline currentTime={currentTime} playing={playing} taskID={taskDetailList} waveformSettings={waveformSettings} />}
</Grid>
</>
);
Expand Down
3 changes: 2 additions & 1 deletion src/ui/pages/container/CL-Transcription/wavesurfer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { setSubtitles } from "../../../../redux/actions/Common";
import C from "../../../../redux/constants";
import DT from "duration-time-conversion";

const Timeline2 = ({ details, waveformSettings }) => {
const Timeline2 = ({ key, details, waveformSettings }) => {
console.log(key);
const waveSurf = useRef(null);
const miniMap = useRef(null);
const regions = useRef(null);
Expand Down

0 comments on commit b030e21

Please sign in to comment.