Comments (6)
@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.
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.
Could you also rerun the buggy API call with options(googleAuthR.verbose = 0)
from googlelanguager.
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.
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.
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)
- Custom config in async call -- unused argument? HOT 7
- Error with speaker diarization HOT 7
- I am getting this error on passing a wav file into readwave function. HOT 1
- Support SSML for text-to-speech HOT 2
- Support device profiles in text to speech
- Authenticated website examples
- Step #1: API returned: Invalid JSON payload received. Unknown name "enableSpeakerDiarization" at 'config': Cannot find field. HOT 1
- Package has a VignetteBuilder field but no prebuilt vignette index.
- Possible issue with asynch call? HOT 2
- gl_speech request almost always times out, no proper error message HOT 18
- no access to Google Cloud Service HOT 2
- Entity sentiment shows but document sentiment shows NA HOT 4
- googleLanguageR does not translate tweets. HOT 8
- lack of MP3 encoding HOT 1
- Error midway and no translated text output HOT 3
- Call for co-maintainers :-) HOT 3
- Split calls in gl_translate more effectively - not all or nothing? HOT 2
- Error: lexical error: invalid char in json text. HOT 1
- Link to package webpage broken - gives 404 on markedmonson.me ...
- Add support to translate files HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googlelanguager.