Skip to content

Commit

Permalink
Merge pull request #1164 from AI4Bharat/asr-redirect-fix
Browse files Browse the repository at this point in the history
Asr redirect fix
  • Loading branch information
ishvindersethi22 authored Mar 7, 2025
2 parents e621ff8 + 6436dc8 commit 2ce1e1f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ const AllAudioTranscriptionLandingPage = () => {
}else{
setWaveSurfer(true);
}
const fetchAudioData = await fetch(String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`), {
const fetchAudioData = await fetch(
(String(resp?.data?.audio_url).includes("https://asr-transcription.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`)
: String(resp?.data?.audio_url).includes("https://indic-asr-public.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://indic-asr-public.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=speechteam/`)
: String(resp?.data?.audio_url)),
{
method: "GET",
headers: ProjectObj.getHeaders().headers
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,13 @@ const AudioTranscriptionLandingPage = () => {
}else{
setWaveSurfer(true);
}
const fetchAudioData = await fetch(String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`), {
const fetchAudioData = await fetch(
(String(resp?.data?.audio_url).includes("https://asr-transcription.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`)
: String(resp?.data?.audio_url).includes("https://indic-asr-public.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://indic-asr-public.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=speechteam/`)
: String(resp?.data?.audio_url)),
{
method: "GET",
headers: ProjectObj.getHeaders().headers
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,13 @@ const ReviewAudioTranscriptionLandingPage = () => {
}else{
setWaveSurfer(true);
}
const fetchAudioData = await fetch(String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`), {
const fetchAudioData = await fetch(
(String(resp?.data?.audio_url).includes("https://asr-transcription.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`)
: String(resp?.data?.audio_url).includes("https://indic-asr-public.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://indic-asr-public.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=speechteam/`)
: String(resp?.data?.audio_url)),
{
method: "GET",
headers: ProjectObj.getHeaders().headers
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,13 @@ const SuperCheckerAudioTranscriptionLandingPage = () => {
}else{
setWaveSurfer(true);
}
const fetchAudioData = await fetch(String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`), {
const fetchAudioData = await fetch(
(String(resp?.data?.audio_url).includes("https://asr-transcription.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://asr-transcription.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=asr-transcription/`)
: String(resp?.data?.audio_url).includes("https://indic-asr-public.objectstore.e2enetworks.net/")
? String(resp?.data?.audio_url).replace("https://indic-asr-public.objectstore.e2enetworks.net/", `${configs.BASE_URL_AUTO}/task/get_audio_file/?audio_url=speechteam/`)
: String(resp?.data?.audio_url)),
{
method: "GET",
headers: ProjectObj.getHeaders().headers
})
Expand Down

0 comments on commit 2ce1e1f

Please sign in to comment.