Giter VIP home page Giter VIP logo

Comments (3)

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

Thanks @smmurphy - I have never tried it on an audio file that long, so will need to check it to reproduce. That error is when the API response is unexpected format, so perhaps its empty or with a message saying something like "Your file is too large" - nevertheless it would be good to track down, will take a closer look.

from googlelanguager.

smmurphy avatar smmurphy commented on August 11, 2024

Thanks for looking into this @MarkEdmondson1234 . I got a little further with this... what I did is regenerate call_api() with the parse function as: parse_async instead of parse_op. This initially threw an error due to the if statement:

if(!is.null(x$metadata$startTime)){
    my_message("Speech transcription running - started at ", x$metadata$startTime,
               " - last update: ", x$metadata$lastUpdateTime, level = 3)
  }

So I made a local copy of the function that was just...

# parse asynchronous speech calls responses
parse_async <- function(x) {
  structure(x, class = "gl_speech_op")
}

Running that returned the request (though not in as convenient a format).

I'm not sure exactly why, likely something to do with metadata handling, but it appears that parse_op is defaulting to parse_speech, which is what I was getting for the 5 minute files and working. For the longer file it still defaults to parse_speech, but that fails whereas parse_async works.

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on August 11, 2024

Thanks @smmurphy that is exactly what I would have done - it would be really useful if you can report the results of str(x) of the object you get with your local copy of parse_async() - then I can modify the existing one to be more forgiving and accept the response you are getting. It sounds odd, that in your case the x$metadata$startTime isn't present, but a quick enough fix to make it conditional.

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.