The sentence is correct.
Here, "nicely" is serving as an adverb to give an information about the verb of the sentence ("talk"). Even though it comes from the adjective nice, which would modify a noun or a pronoun and not a verb, the addition of the suffix -ly makes it an adverb. That is why it works in this sentence.
Other examples could be: