diff --git a/speechmatics/cli.py b/speechmatics/cli.py index bbdaac4..ad7e62a 100755 --- a/speechmatics/cli.py +++ b/speechmatics/cli.py @@ -590,10 +590,7 @@ def transcript_handler(message): transcripts.text += plaintext def get_channel(message): - return next( - (result["channel"] for result in message["results"] if "channel" in result), - None, - ) + return message.get("channel") def audio_event_handler(message): if print_json: