In the line you provided from Ray Bradbury's "There Will Come Soft Rains," the literary device at work is personification. By giving the voice clock human attributes—specifically, the ability to "sing" and a sentiment of being "afraid"—Bradbury creates a vivid imagery that imbues the clock with human emotions and characteristics.
The effect of this personification is multi-faceted. First, it emphasizes the loneliness and emptiness of the house after the human occupants are gone, suggesting a haunting void where life and interaction once existed. The clock's singing becomes a poignant reminder of the life that used to fill the space, highlighting the stark contrast between the mechanical world that continues to function and the absence of human presence.
Additionally, it underscores the themes of technology and its role in society. The clock, representing the automated aspects of life, continues its routine, almost desperately trying to maintain normalcy, despite the catastrophic changes that have occurred. This portrayal invites readers to reflect on the relationship between humanity and technology, particularly in the face of destruction, and raises questions about what remains meaningful when humanity is absent. The personification thus deepens the emotional impact of the narrative and enhances its exploration of a post-apocalyptic world.