Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize Language of Input File #16

Closed
hermify opened this issue Jul 6, 2023 · 2 comments
Closed

Recognize Language of Input File #16

hermify opened this issue Jul 6, 2023 · 2 comments

Comments

@hermify
Copy link

hermify commented Jul 6, 2023

When the language is set to "auto", is there a way to get the analyzed language of the input file?

@hermify
Copy link
Author

hermify commented Jul 6, 2023

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
Copy link
Owner

ariym commented Nov 20, 2023

Added to Roadmap

@ariym ariym closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants