0
votes

I'm trying to extract all the "transcript" data from this file which is the result of a Google Speech-to-Text request : https://pastebin.com/MFF1Dav8 (Not sensitive data, just from an interview I conducted).

To do so I found a prewritten command which I'm using :

jq <interview.json '.response.results[].alternatives[].transcript' -r > interview.txt

Except I get :

jq: error (at <stdin>:111181): Cannot iterate over null (null)

How can I work around this ? All I want is the raw transcript text. Thank you

1

1 Answers

0
votes

The JSON you posted does not have a top-level "response" key.

This seems to do the trick:

.results[].alternatives[].transcript