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

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

Closed
PaulLerner opened this issue Oct 23, 2019 · 9 comments

Comments

@PaulLerner
Copy link
Contributor

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,

@strelok2012
Copy link
Contributor

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

@PaulLerner
Copy link
Contributor Author

PaulLerner commented Oct 23, 2019 via email

@strelok2012
Copy link
Contributor

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

@PaulLerner
Copy link
Contributor Author

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).

@strelok2012
Copy link
Contributor

strelok2012 commented Oct 24, 2019

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

@PaulLerner
Copy link
Contributor Author

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".

@PaulLerner
Copy link
Contributor Author

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.

@strelok2012
Copy link
Contributor

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

PaulLerner pushed a commit to PaulLerner/gecko that referenced this issue Oct 31, 2019
@PaulLerner
Copy link
Contributor Author

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 !

PaulLerner pushed a commit to PaulLerner/gecko that referenced this issue Nov 5, 2019
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

2 participants