speech-to-text-nodejs
speech-to-text-nodejs copied to clipboard
Browser Running Out of Memory
I tried to to get a text of an audio which has a length of 33 minutes and it has multiple speakers. First I tried with google chrome 60.0.3112.113 (Official Build) (64-bit) then Opera 47.0.2631.71 (PGO) and Firefox 55.0.3 (32-bit) though Firefox could survive more ;) , ultimately all of the browsers went "Out of memory".I used US English Broadband Model(16Khz). I split the audio into 2 and then ran it again it worked fine. I've already seen the notice that "Some models can detect multiple speakers; this may slow down performance.". But notifying the users a error free maximum length for an audio can enhance the usability of the application. Otherwise users get the error after waiting a long time. it is not good at all I guess ? cause I also faced the same problem. Thanks
Can you share the file you were using?
A it's kind of a private one, What I uploaded was an (.opus) file, and there were 2 speakers and the file size is around 15 mb s. Can you try with a file like that?
I think I can.
Love to see the results 👍
@germanattanasio any updates?
I can think of a couple of possible causes:
- It's loading the entire audio file into memory, perhaps there is a bug somewhere that causes this to happen multiple times
- the interim results sends a new JSON blob for every second or so of audio, and we hang onto all of them for the JSON tab
If it's the later, I'm not sure if there is a good fix... Maybe just suggest that the demo shouldn't be given more than 15 minute's worth of audio? Or, I suppose we could start throwing away old interim results after some cutoff, maybe 5 minutes.
I feel
interim results sends a new JSON blob for every second or so of audio, and we hang onto all of them for the JSON tab
this could be the most possible one. If that is the case as you,ve mentioned
Or, I suppose we could start throwing away old interim results after some cutoff, maybe 5 minutes.
throwing away after previously notified cut off time to the user could be a good suggestion. :)