Skip to content

Conversation

@UP929312
Copy link

@UP929312 UP929312 commented Jun 9, 2022

context managers, tuple unpacking, enumerate all should be used.

context managers, tuple unpacking, enumerate all should be used.
Copy link

@CoolCat467 CoolCat467 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, maybe change f to file to be more pythonic though.

@UP929312
Copy link
Author

Looking good, maybe change f to file to be more pythonic though.

I've seen both f and file, with f obviously being short for file, but uhh, I think it's clear enough

for elem in schedules[4]:
timestamp, _, phoneme = elem.split(",")
framestamp = timestepToFrames(float(timestamp))
if i >= 1 and framestamp <= phonemeTimeline[-1][1]: # we have a 0-frame phoneme! Try to fix it.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index i is used here but you removed it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh dear, you're right

phoneme = parts[2]
phonemeTimeline.append([phoneme,framestamp])
phonemeTimeline.append(["end",FRAME_COUNT])
phonemeTimeline.append([phoneme, framestamp])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phoneme is never set anymore

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix with phoneme = parts[2] as original had it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants