There is not much difference between speak and talk. They are usually both
possible in most situations.
Formality
Talk is less formal than speak. In fact, talk is the usual word to refer to informal
communication.
Speak is not usually used before sense, nonsense and other words with similar
meanings.
Lectures etc
Talk is often used for the act of giving an informal lecture. Speak is preferred for
more formal lectures.
Compare:
Could I speak to Alice, please? (More natural than Could I talk to Alice?)
Often times the word "talk" and "speak" can be used interchangeably. However there
are slight differences between the two especially with regard to grammar. Let me
quote a few examples:
On the other hand, many other constructions work just as well with either (though
they might have subtle differences). For example:
speak to ... talk to
Now if you observe carefully these examples and other daily usages you would notice
that "talk" is generally not directly associated with an object. On the other hand, "speak"
can either appear with or without one.
Whether you use "speak" or "talk" depends on what you intend to communicate.
Originally, "speak" meant one person communicating. Talk(from tell) originally meant
the same thing as speak, but evolved to connote a conversation or dialogue. In short,
speak is often used for one-sided communications (e.g. He spoke to his colleagues),
whereas talk is used to refer to a conversation or discussion between two or more
people (e.g. everyone in the room was talking when he walked in). Also, remember
"speak" is a little more formal and polite than "talk", as speak connotes more care or
intelligibility. That is, there are meaningful words and the words are clear whereas talk
seems like a muddier term.