Your answer is personification :)
Soliloquy. Because the definition is quite literally <span>an act of speaking one's thoughts aloud when by oneself or regardless of any hearers, especially by a character in a play.</span>
Proctor said those words for he was trying to protect his wife