Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcript Speaker Detection isn't perfect #1193

Open
wesbos opened this issue Oct 19, 2023 · 11 comments
Open

Transcript Speaker Detection isn't perfect #1193

wesbos opened this issue Oct 19, 2023 · 11 comments
Assignees
Milestone

Comments

@wesbos
Copy link
Collaborator

wesbos commented Oct 19, 2023

image

@wesbos
Copy link
Collaborator Author

wesbos commented Oct 23, 2023

still an issue: https://twitter.com/KrisTemmerman/status/1716507884656427469

@wesbos wesbos reopened this Oct 23, 2023
@stolinski stolinski added this to the 2.01 milestone Oct 24, 2023
@wesbos
Copy link
Collaborator Author

wesbos commented Oct 26, 2023

image

Scott is an announcer on some of them. Likely related to the regex

@themisterholliday
Copy link
Contributor

If we have a way to populate the transcript data locally, I could track down these issues.

@wesbos wesbos changed the title my dog eats food on the moon Transcript Speaker Detection isn't perfect Feb 20, 2024
@wesbos
Copy link
Collaborator Author

wesbos commented Feb 20, 2024

Some more details: #1562 (comment)

@themisterholliday I think I can get you a DB dump if you are still interested?

@themisterholliday
Copy link
Contributor

Some more details: #1562 (comment)

@themisterholliday I think I can get you a DB dump if you are still interested?

Yep I'll take a look if you can grab that 👍

@wesbos
Copy link
Collaborator Author

wesbos commented Feb 21, 2024

Emailed ya. Some details:

Here is where we actually append the speaker names:

const sayings: [string | RegExp, string][] = [

And here we filter the flaggings out (less of an issue)

const scott = new RegExp(/purple cheese before meeting/gi);

@themisterholliday
Copy link
Contributor

Got it 👍
I'll take a look at this and see what i can find

@themisterholliday
Copy link
Contributor

So, I'll break this into three issues:

  1. The flags for speaker detection are sticking around in the transcript view
  2. Wes or Scott is missing in the entire transcript
  3. Scott is mislabeled as Announcer

The flags for speaker detection are sticking around in the transcript view

This can be seen here: https://syntax.fm/show/683/spooky-coding-horror-stories-2023-part-1/transcript
This is because the transcript attributes "My name is Wes. My dog eats food on" to Wes and "the moon." to Scott, which breaks the Regex.

To fix this:

  • The Regex could be even more relaxed
  • A search for "startsWith" could be added the same as the line for Scott
  • or some change could be made to the ingest of transcripts as they are saved to the DB.

I see the first two as still a little "hacky," but getting this right for all occasions seems complicated.

Wes or Scott is missing in the entire transcript

This issue is because speakers are mislabeled (probably while saving the transcript) with "99" as their speaker id.
Then we filter speakers with the "99" id:

.filter((utterance) => utterance.speakerId !== 99)

If we don't filter, the speakers still have names, so they show up just fine in the recent shows.

But I'm assuming this was causing an issue on some other shows, so if we have those, I can double-check the filter.
On top of removing the filter, we could check for no speaker name, have the entry in the transcript, and label it as "unknown."

Examples:
https://syntax.fm/show/726/is-htmx-a-joke/transcript

  • Scott has a speakerId of 99 and is filtered out completely

https://syntax.fm/show/727/how-to-code-opinionated-typescript-stack-tooling-choices-explained/transcript

  • Wes has a speakerId of 99 and is filtered out completely

Scott is mislabeled as Announcer

Can you provide the show number we were seeing this? I can't find one, but I'm checking a limited subset.

@wesbos
Copy link
Collaborator Author

wesbos commented Feb 22, 2024

sweet thanks. The speaker ID of 99 is important, - I forget why though. Ill check tomorrow.

I think all of these issues are due to the regex either being too relaxed, or not relaxed enough.

I'd have to check, but I don't think I'm saving the speaker's name in the DB, just the speakers number. The problem with our transcript provider is they don't tell you who is 1 or 2, so we have to do that ourselves.

@themisterholliday
Copy link
Contributor

If I'm following correctly the speaker name is correctly found here (and above):

const speakerName = speakerNames.get(utterance.speakerId);

Which accounts for any speaker id in conjunction with detectSpeakerNames.
Since the speaker id is saved in the DB, in show 727 your id is 99 instead of 1 or 2. (I think the announcer may be 99 in some older shows?)

Ah yea I remember y'all saying the transcript provider doesn't give the speaker which is why this code is required.

@stolinski stolinski removed this from the 2.01 milestone Jun 27, 2024
@stolinski stolinski added this to the 2.1 milestone Jun 27, 2024
@wesbos
Copy link
Collaborator Author

wesbos commented Jul 8, 2024

the incorrect marking is fixed. I'd like to figure a way to map the speaker numbers to show guests now.

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

No branches or pull requests

3 participants