In this line from Walt Whitman's poem "I Hear America Singing," personification is used.
Personification is a figure of speech, or indirect way of conveying an idea, that represents a non-human thing as if it were human so as to give human qualities or traits to it, often by way of a metaphor.
In this case, when Whitman wrote "I hear America singing", he gave America a quality of human beings, that is the possibility to sing.