Code Monkey home page Code Monkey logo

Comments (6)

Timo-Ko avatar Timo-Ko commented on June 18, 2024 1

@MarkEdmondson1234 I used some more (and longer files) and noticed that the API Call produces multiple data frames in the second $timings list of the output. The longer the audio file, the more data frames it produces it seems. The last data frame in that list is always the complete transcription and the previous ones only cover parts of the transcription. Also only the last data frame in that list has a $speakerTag column. Maybe that is something worth looking into?

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on June 18, 2024

Thanks for report, it sounds like a parsing error when supporting this new feature. Would you have an example file I can use for debugging purposes? (if not confidential, obviously)

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on June 18, 2024

Could you also rerun the buggy API call with options(googleAuthR.verbose = 0)

from googlelanguager.

Timo-Ko avatar Timo-Ko commented on June 18, 2024

Hi Mark, thanks for your fast reply!
I have sent you a sample file via email and also reran the buggy API call with your options, but it still throws the same warning.

from googlelanguager.

MarkEdmondson1234 avatar MarkEdmondson1234 commented on June 18, 2024

I tested your file and with no code changes got a different response format that your example, so perhaps you just need to update to the latest version? The speakerTags are in the second data.frame, for some reason it puts it into a second alternative.

    my_config <- list(encoding = "LINEAR16",
                      enableSpeakerDiarization = TRUE,
                      diarizationSpeakerCount = 2)

    testcall <- "gs://mark-edmondson-public-read/testcall.wav"

    apicall<- gl_speech(testcall,
                        sampleRateHertz = 8000,
                        languageCode = "de-DE",
                        asynch = TRUE,
                        customConfig = my_config)

    testcall_transcript <- gl_speech_op(apicall)

str(testcall_transcript)
List of 2
 $ transcript:'data.frame':	2 obs. of  4 variables:
  ..$ transcript  : chr [1:2] "ja hallo ja und vergebe Zusatzdaten und zwar hat er was mache ich als nicht anzumerken ist einfach machen 815" "und wie heißt die Variable die drin da diese Datei ein Kratzer nennst Zusatzdaten Zusatzdaten vorgangs-id nicht"| __truncated__
  ..$ confidence  : chr [1:2] "0.84218776" "0.8393922"
  ..$ languageCode: chr [1:2] "de-de" "de-de"
  ..$ channelTag  : logi [1:2] NA NA
 $ timings   :List of 2
  ..$ :'data.frame':	20 obs. of  3 variables:
  .. ..$ startTime: chr [1:20] "0s" "17.600s" "18.100s" "18.200s" ...
  .. ..$ endTime  : chr [1:20] "17.600s" "18.100s" "18.200s" "19.100s" ...
  .. ..$ word     : chr [1:20] "ja" "hallo" "ja" "und" ...
  ..$ :'data.frame':	43 obs. of  4 variables:
  .. ..$ startTime : chr [1:43] "0s" "17.600s" "18.100s" "18.200s" ...
  .. ..$ endTime   : chr [1:43] "17.600s" "18.100s" "18.200s" "19.100s" ...
  .. ..$ word      : chr [1:43] "ja" "hallo" "ja" "und" ...
  .. ..$ speakerTag: int [1:43] 1 1 1 1 1 1 1 1 1 1 ...

testcall_transcript$timings[[2]]$speakerTag
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

It does a worse job though than your example though, putting every entry as speakerTag=1, but I don't see how that is related to any parsing problems, its in the raw API response. I tried setting to enhanced "phone_call" model to improve the results but its unsupported for German.

from googlelanguager.

Timo-Ko avatar Timo-Ko commented on June 18, 2024

Hi Mark, it seems that I just had to update R from 3.5.1 to 3.5.3 and now the transcription runs smoothly again.
Thanks a lot for your help! :)

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.