SpeakerIndex is an Integer ( 0 , 32 , 999 etc...)
Upon starting a conversation, usually the target ( most likely the NPC) will be the index 0 unless specified otherwise ( Directly in the dialog there's a dropdown list).

If you launch a dialog manually ( startTwoSpeakerDialog), then the speaker index is the order in which you put each character variable. ex :
StartTwoSpeakerDialog("myDialog",CHARACTER_NPC,CHARACTER_PLAYER1)

speakerindex 0 represents CHARACTER_NPX
speakerindex 1 represents CHARACTER_PLAYER1