Skip to content

Commit

Permalink
Merge pull request #192 from ajinkyapandetekdi/fillintheblanks-all-de…
Browse files Browse the repository at this point in the history
…v-tn

Issueid #229204 fix: Even after speaking correct word,showing wrong a…
  • Loading branch information
gouravmore authored Oct 29, 2024
2 parents dfacc01 + 24f489f commit ef5306f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/utils/VoiceAnalyser.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,17 @@ function VoiceAnalyser(props) {
);

setApiResponse(callUpdateLearner ? data.status : "success");

if (
callUpdateLearner &&
(props.pageName === "wordsorimage" || props.pageName === "m5")
) {
const isMatching =
data?.createScoreData?.session?.error_rate?.character === 0;
if (typeof props.updateStoredData === "function") {
props.updateStoredData(recordedAudio, isMatching);
}
}
if (props.handleNext) {
props.handleNext();
if (temp_audio !== null) {
Expand Down Expand Up @@ -712,12 +723,6 @@ function VoiceAnalyser(props) {
<Box
sx={{ cursor: "pointer" }}
onClick={() => {
if (
props.pageName === "wordsorimage" ||
props.pageName === "m5"
) {
props.updateStoredData(recordedAudio, isMatching);
}
if (props.setIsNextButtonCalled) {
props.setIsNextButtonCalled(true);
} else {
Expand Down

0 comments on commit ef5306f

Please sign in to comment.