gong-io/gecko

Feature request/doc request : Change speaker id by choosing from a given list

PaulLerner opened this issue · 9 comments

Hi again,
I'd like that the user should not be able to edit the name of the speaker directly but he should be able to choose from a list.
I should be able to implement it myself but I'm having problems diving into the code given the lack of technical documentation.

Bests,

Hi,

First, i need to know, where you want to place the list of Speakers here or here?

If you want to use second variant, just change input to select in static/index.html file (link) and remove an 'editable' attribute from here in the same file

If i doesn't getting you right, please explain in more detail

Thank you

So, you want to replace speaker list with checkboxes with one list of speakers? Each segment will have only one speaker?

so it would change the speaker id of all segments of that speaker

How you want to change a speaker for only one region? I did'nt getting how it should work from UX side, sorry

No the speaker list should stay, only, instead of being able to edit the name of speaker we could have a dropdown list where each option is a speaker. Yes, each segment will have only one speaker.
Currently, when you edit the name of a speaker, e.g. "Roger" → "foo". All the segments labelled as "Roger" will be labelled as "foo". That's the behaviour I want.
I know it would be probably easier to just change the behaviour of the checkbox but we have another app for diarization where we want to keep the checkbox system.
This feature is for an identification app where the user should not be able to change the id of a single segment (i.e. using the checkbox).

Ok, got it, so, what you should do, i think:

Replace this code from index.html with single <select> with all speakers list (use select instead of ng-repeated labels, and use speakerChanged function to listen a change event)

In speakerChanged function, use iterateRegions function to find all regions with this speaker and change it

I think it should works

Why should I use speakerChanged instead of speakerNameChanged ?
I managed to replace the editable span by a select (see my fork).
However I'm not sure how to get the updated value of the select form as I'm having trouble understanding what you did with the $scope in controller.js.
Looking at this QA it seems that I should be able to get $scope.speaker as I have set ng-model="speaker".

Never mind my last comment, I managed to do it (see my fork).
So it looks like it's working (I used the speakerNameChanged function with only difference is I removed the check for duplicate speaker). One detail is that the color of the displayed regions waveform is not updated, although we go through updateLegend, so I'm not sure what's happening there.

Hi, you need to call a regionUpdated (link) function for each region where you changed a speaker

Hi, thanks for your answer.
I tried that earlier but it didn't work for some reason... I managed to do it using the changeSpeakerColor function see commit where I reference this issue.

Thanks for your help !