The sound devices that Robert Frost employs in his popular "The Road Not Taken" certainly add to the music of the poem and its rhythm, which, in turn, affects the mood of the poem.
Frost's poem is written in four quatrains with the common iambic rhythm of [ta DUM, ta DUM....], the rhythm of speech. But, while poems are commonly written in iambic pentameter, Frost limits his lines to iambic tetrameter, placing an anapest at the end of the line. Thus, there is the steady rhythm of footsteps, but a slowing down or hesitation before the last iamb of the line. For instance, this line exhibits two iambs, then an anapest, followed by an iamb (the bold are the stressed syllables)
Two roads di verged in a wood, and I--
This pattern indicates a slowing down, a certain hesitation. This creates a mood of doubt and ambivalence.
In addition, Frost furthers this mood of hesitation and indecision with end-stopped lines such as those with commas, semi-colons, and periods. Of course, the lines that end with periods are heavily end-stopped, but the others serve also to give pauses to the lines, and so the mood of hesitation and rue is reinforced.