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

[1m[32m[0m with response every time. #19

Open
harshil4076 opened this issue Apr 14, 2023 · 1 comment
Open

[1m[32m[0m with response every time. #19

harshil4076 opened this issue Apr 14, 2023 · 1 comment

Comments

@harshil4076
Copy link

harshil4076 commented Apr 14, 2023

I used this library in a my remix app. You can find the code here https://github.com/harshil4076/ts-voice-text (live version won't work).

I am running it on my local machine Ubuntu with 24 GB Ram and no extra GPU power. It takes some time to response but its good for testing.

With every response I am seeing this �[1m�[32m�[0m. either in the begining or the end.

image

image

What could be causing this??

Great library btw. Shout out to the owners! Cheers!

@JakeCigar
Copy link

I had the same problem. I just strip off these ANSI escape sequences. As they only make sense for a terminal, or the console log.

const ansiEscapeSequences=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g
const usableString=badString.replace(ansiEscapeSequences,"");

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