The Raven is a very tightly organized poem. Consonance—the repetition of consonant sounds—is just one of the ways Poe's language is meant to evoke a feeling of hypnotic melancholy. Take, for instance, the third stanza:
And the silken, sad, uncertain rustling of each purple curtain
Thrilled me—filled me with fantastic terrors never felt before;
So that now, to still the beating of my heart, I stood repeating
“’Tis some visitor entreating entrance at my chamber door—
Some late visitor entreating entrance at my chamber door;—
This it is and nothing more.”
One of the repeating vowel sounds here is the hard T sound: uncertain, rustling, curtain, fantastic, terrors, felt, to, still, beating, heart, stood, repeating, and so forth. Once you start paying attention to it, you can find many examples of consonance in the poem. Notice in the fourth stanza, for example, the repeating "G" sound.
This repetition serves to set up a kind of rhythm in opposition to the actual meter of the poem, which is trochaic octameter, or eight trochees in a line (a trochee has two syllables, with the emphasis on the first syllable), the rhyme scheme (ABCBBB) with an internal rhyme in the first line (notice, above, "uncertain" and "curtain"), and the extensive use of alliteration
(silken, sad). It all serves to create a poem that has a definite "sound" and rhythm to it, but that, nevertheless, is a little "off," just like the narrator of the poem seems like a reasonable person, but is just a little "off" as well!