In the famous peom 'The Brook' by Alfred Lord Tennyson, the brook is personified and thus a line reads:

I chatter chatter..

The question is what is the literary device here.

The answer I think is repetition, and also onomatopoeia.

Can it by any way a metaphor?
I would pick onomatopoeia and personification.
Thank you, AlphecccaStars.