Giter VIP home page Giter VIP logo

Comments (11)

dataning avatar dataning commented on August 11, 2024 2

Sorry, one remaining issue - I tried a 15 minutes wav file and it keeps coming back with the API Data failed message. I have read some previous closed threads who had a similar issue. What's the best way to overcome this?

async <- gl_speech("gs://6pokemon/buzzfeed.wav", sampleRateHertz = 44100L, asynch = TRUE)
result <- gl_speech_op(async)

Error in data_parse_function(req$content, ...) : object 'out' not found
Warning message:
In call_api() :
  API Data failed to parse.  Returning parsed from JSON content.
                    Use this to test against your data_parse_function.

from googlelanguager.

dataning avatar dataning commented on August 11, 2024 1

Everything is working fine now! Thanks Mark!

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024 1

Try again now with the latest version (and thanks for the test file)

gl_speech("gs://6pokemon/buzzfeed.wav", sampleRateHertz = 44100L, asynch = TRUE)
gl_speech_op(.Last.value)
2018-03-22 16:44:22 -- - started at 2018-03-22T15:39:25.442136Z - last update: 2018-03-22T15:44:09.817086Z
## Send to gl_speech_op() for status
## 3081429970242452248
gl_speech_op(.Last.value)
2018-03-22 16:45:11 -- Asychronous transcription finished.
....

It took about 5 mins to transcribe

from googlelanguager.

dataning avatar dataning commented on August 11, 2024 1

It worked magically and yes, I can confirm that it has taken 5 minutes to convert a 15-minutes wav file.

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024 1

Party :)

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

Add it via the sampleRateHertz argument e.g.

gl_speech(test_audio, sampleRateHertz = 48000L)$transcript

from googlelanguager.

dataning avatar dataning commented on August 11, 2024

Thanks Mark.

I found the problem had something to do with the duration of the sound file - it's over 1 minute. So I have uploaded the file to the cloud bucket and put the link into first parameter. I have listed the syntax below and the file is in public. At the moment, the return is "NULL" - very interesting.

gl_speech("gs://6pokemon/gen.wav", encoding = "LINEAR16", sampleRateHertz = 48000L, asynch = TRUE)$transcript
gl_speech("gs://6pokemon/gen.flac", encoding = "FLAC", sampleRateHertz = 48000L, asynch = TRUE)$transcript

Have you got any examples trying to translate a wav/flac file, which is more than 2 or 3 minutes - like a song's length)?

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

I just fixed that a second ago in this commit e364110 , if you download the latest GitHub version - for long running it should return an async object, which you then feed into gl_speech_op() that will return your data once finished

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

That is setting it back to what is documented here http://code.markedmondson.me/googleLanguageR/articles/speech.html I think it got overwritten in a recent pull, sorry about that.

from googlelanguager.

AdhishiP avatar AdhishiP commented on August 11, 2024

Hello, Im trying to run a wav fileand I'm continuously getting this error. What to do?
Error: API returned: Must use single channel (mono) audio, but WAV header indicates 2 channels

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

@AdhishiP please don't comment on closed issues, open a new one, although in your case it looks like this issue may help you: #34

from googlelanguager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.