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

Events not being sent, only until after the connection was closed #53

Open
willemmulder opened this issue Jun 24, 2024 · 5 comments
Open

Comments

@willemmulder
Copy link

Describe the bug
I have two scenarios where the Speechmatics SDK is not returning an Event that I expect. Only after I close the connection, the event is returned. Not sure if it's the API or the SDK that is the culprit.

Two examples:

  • For a short audio file (few kb. two sentences), the first sentence is successfully returned, but the second sentence is never returned. Only when I close the connection or send "EndOfStream" explicitly, the sentence suddenly arrives.
  • For an invalid audio file (11 bytes, with UTF content "Not found.\n") I do not get anything from the SDK. No error, no transcription, nothing. Only when I close the connection, I get

Speechmatics session error {
message: 'Error',
type: 'invalid_audio_type',
reason: 'Invalid audio type: Could not determine type of stream.'
}

To Reproduce

  • Create file with "Not found.\n".
  • Send it to the SDK
  • See that nothing happens
  • Close the connection
  • See that an Event arrives

Expected behavior
I expect for the two scenarios

  1. Short files should be fully transcribed, It feels as if Speechmatics keeps on waiting for more audio. However, setting max_delay does not help either.
  2. Invalid files should immediately be rejected with an Error.

Desktop (please complete the following information):

  • OS: WIndows and Linux
  • Version 3.x and 4.x
@nickgerig
Copy link
Contributor

@willemmulder thanks for this - I was able to reproduce both issues, we'll take a look.

@willemmulder
Copy link
Author

@nickgerig Sure; and thanks for checking! Looking forward to more news :-)

@willemmulder
Copy link
Author

Hey @nickgerig is there any update on this? It's quite annoying in our situation... Thanks! :-)

@nickgerig
Copy link
Contributor

@willemmulder I chatted with one of the engineers yesterday:

For the error case our API is waiting for something it can decipher rather than exiting immediately. So the onus is on the client to make sure that they are sending audio.

For the short file example could you give me a test case? I'm struggling to reproduce it in using the SDK example.

@willemmulder
Copy link
Author

Hey @nickgerig thanks for checking!

For the error case I do understand that we can/should also be checking our data, but I also expect Speechmatics to return an error when it receives and EOF and no audio has been sent. But let me check whether we actually send EndOfStream.

For the other case, let me see if I can get an example audio file to test with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants