Recognize Language of Input File
hermify opened this issue · 2 comments
hermify commented
When the language is set to "auto", is there a way to get the analyzed language of the input file?
hermify commented
You can grep the information in the shell-function:
if(stderr?.includes("auto-detected language")) {
// Grep the language and correlation (auto-detected language: XXXX (p = 0.999))
// languageAtts = stderr.match(/auto-detected language: (.*) \(p =/)
languageAtts = stderr.match(/auto-detected language: (.*) \(p = (.*)\)/)
language = languageAtts[1]
languageCorrelation = languageAtts[2]
}
if (code === 0){
resolve({
transcript: stdout,
language: language,
languageCorrelation: languageCorrelation
})
}else{
reject(stderr)
}
ariym commented
Added to Roadmap