Speech is related to Discourse. 
Dialogue is related to Talk. Talk is a synonym of Language. Language is related to Written. 
Speech <--RelatedTo--> Discourse 
Dialogue <--RelatedTo--> Talk <--Synonym--> Language <--RelatedTo--> Written 