-
Notifications
You must be signed in to change notification settings - Fork 15
Connection timed out #5
Comments
Hey, can you share a snippet of how you're creating the StreamingClient instance and the way the audio is being piped into it? I tested using the example file and that is working for me. One additional thing to check would be if you have sox installed, the node-record-lpcm16 package which is being used in the example internally relies on sox for streaming the user audio. |
|
Ok, I got it to work with It also misses about 500ms from the beginning, and about 2.5s from the end. Any idea why? This is how it looks now (requires
|
Ok, the missing part in the beginning is because the stream started before the connection was opened. I moved the pipe to the 'open' event and it was fixed. Still investigating the missing end. |
Nice, for the missing part at the end, I am guessing the amount buffered is less than the threshold you have specified so it’s not forwarding that? Could you also share the final script and we can add that to the examples? Would be good to have that in there for reference. |
#9 solves the early send issue. I still didn't find a solution for the end. |
And the throttling should probably be done in the library, and not in client code. There's no reason for the user to get into these details. |
I agree to a certain extent but how would the package differentiate if the client is already throttling the input stream? My original use case depends on a live audio stream that takes care of the throttling, perhaps we can make it an optional feature so those who want the package to handle throttling, can enable it. Otherwise, we leave it up to the user. |
In the file streaming example I was getting the connection time out and error at the end of the file after 15 seconds. However, I found a more elegant way to end the streaming of the file as following.
In nodejs streaming, we can know if the streaming is ended by calling |
I'm using the sample code (with a valid user of course), and getting the following output (I enabled
DEBUG=aws-transcribe:*
):The text was updated successfully, but these errors were encountered: