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

Async call does not return the entire transcript #23

Closed
davidmeza1 opened this issue Oct 30, 2017 · 5 comments
Closed

Async call does not return the entire transcript #23

davidmeza1 opened this issue Oct 30, 2017 · 5 comments

Comments

@davidmeza1
Copy link

davidmeza1 commented Oct 30, 2017

Taking a wild shot here hoping you have seen this. I am trying to transcribe a 2+ minute audio file asynchronously. I am able to send the audio file and return the results. However, I am only getting 18 seconds back. Checking the google API dashboard, I see the entire 2 minute file is processed. I have checked with google support and all looks well there.

Have you seen any issues with not all of the file being returned. I am running R 3.4.1 and googleLanguageR 0.1.0.9000 on a MAC 10.12.6

Testwav3 <- ("gs://qual_audios/audio_only3.flac")
Testasync3 <- gl_speech(Testwav3, encoding = "FLAC", sampleRateHertz = 16000L, asynch = TRUE)
Test_result3 <- gl_speech_op(Testasync3)
@davidmeza1 davidmeza1 changed the title Async call does not return the entire teranscript Async call does not return the entire transcript Oct 30, 2017
@MarkEdmondson1234
Copy link
Collaborator

Hmm, well it could be the API in which case I can't do much aside recommend raising a bug report with them, but I would also check the encoding of the wave file, as I sometimes got back a shorter file due to it thinking 8-bit was 16-bit, for example. However if you are getting some audio back and that plays ok, its not that.

If you can, perhaps check by splitting up the audio file into smaller chunks that the non-asnch call can deal with (less than 60 seconds) - something like Audacity should deal with that.

@jenswaeckerle
Copy link

We are having a similar issue here: We tried audio from videos that youtube is able to provide subtitles for, so we think the speech recognition is probably not the problem. How do I check which encoding is correct, should I save the audio file as 8-bit or 16-bit as the function itself can't specify this? Do zou have any other ideas how we could circumvent this problem?

I'm running R 3.4.1 on Mac 10.12.6, using a FLAC file.

Thanks!

@MarkEdmondson1234
Copy link
Collaborator

I need to test whether this is an issue with this library or the API. The encoding and sample rate should match the audio file, although in some cases it autodetects.

@MarkEdmondson1234
Copy link
Collaborator

Ok it was the library, I didn't test it with a long enough sound file. It is fixed now, and I changed the output structure a little to make it easier to get the two versions of output.

The return is now a list of two data.frames (tibbles) - one as $transcript holds a transcript and any number of alternatives you specify with the confidence in the transcription; the other $timings carries information on when the words were spoken in the audio.

@MarkEdmondson1234
Copy link
Collaborator

@jenswaeckerle @davidmeza1 This fix is now on CRAN v 0.1.1 - thanks for the report!

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

3 participants