TalkEd is the program used for viewing and editing the Dialog.tlk file for KotOR and TSL; it is available at Star Wars Knights.
When the program is opened, you must select the range of string references (StrRefs) to display - the default setting encompasses all StrRefs.
To edit a StrRef, double-click on it - this will open up the editor window. Here, you can edit the text of the StrRef, the sound associated with it (usually voice-over), and the properties of said sound when played.