Skip to content

Commit 39d88e2

Browse files
committed
tweaking code for next blog post
1 parent ad0e039 commit 39d88e2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

transcribe-speech-text-script/get_transcription.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ def get_transcription(transcription_id):
2323
args = parser.parse_args()
2424
transcription_id = args.transcription_id
2525
response_json = get_transcription(transcription_id)
26-
for word in response_json['words']:
27-
print(word['text'], end=" ")
26+
if response_json['status'] == "completed":
27+
for word in response_json['words']:
28+
print(word['text'], end=" ")
29+
else:
30+
print("current status of transcription request: {}".format(
31+
response_json['status']))

0 commit comments

Comments
 (0)