Skip to content

Commit

Permalink
Merge pull request #20 from AgrI-Mitra/hotfix/bhashini_itn
Browse files Browse the repository at this point in the history
Fixed ASR for 'kn', 'ur', 'ml', 'gu', 'pa'.
  • Loading branch information
Amruth-Vamshi authored Feb 16, 2024
2 parents e5604ad + dddc504 commit 331a175
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/modules/aiTools/ai-tools.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,23 @@ export class AiToolsService {
"sourceLanguage": language
}
})
let requestConfig = {
"language": {
"sourceLanguage": language
}
}
if(['kn', 'ur', 'ml', 'gu', 'pa'].indexOf(`${language}`)==-1){
requestConfig["postProcessors"] = [
"itn"
]
}

let response: any = await this.computeBhashini(
config?.pipelineInferenceAPIEndPoint?.inferenceApiKey?.value,
"asr",
config?.pipelineResponseConfig[0].config[0].serviceId,
config?.pipelineInferenceAPIEndPoint?.callbackUrl,
{
"language": {
"sourceLanguage": language
},
"postProcessors": [
"itn"
],
},
requestConfig,
{
"audio":[
{
Expand Down

0 comments on commit 331a175

Please sign in to comment.