Skip to content

Commit 04cca7a

Browse files
J-JaywalkerJames Walkerdumitrugutu
authored
Move channel field into root of AddTranscript (#138)
* modify get channel to properly take moved channels into account * Change get to return default value Co-authored-by: Dumitru Gutu <dumitrugutu@users.noreply.github.com> --------- Co-authored-by: James Walker <jamesw@speechmatics.com> Co-authored-by: Dumitru Gutu <dumitrugutu@users.noreply.github.com>
1 parent cef0468 commit 04cca7a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

speechmatics/cli.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,7 @@ def transcript_handler(message):
590590
transcripts.text += plaintext
591591

592592
def get_channel(message):
593-
return next(
594-
(result["channel"] for result in message["results"] if "channel" in result),
595-
None,
596-
)
593+
return message.get("channel")
597594

598595
def audio_event_handler(message):
599596
if print_json:

0 commit comments

Comments
 (0)