Consider the following piece of dialogue:
Peter: Hello, Mary! How do you do?
Mary: Hi, Peter! Fine, and you?
What is the term for the part in bold, the specification of who is to speak a particular line?
If you're talking about the name for the text that says who is speaking, in screenplays these seem to be called "character cues" or "character names". I've checked several formatting guides for screenplays, and those that have a term for this use one or the other of these.