"Porphyria's Lover" by Robert Browning is not a soliloquy.
A soliloquy is a speech with a play given by a character who is not speaking to other characters on the stage. One can think of it as the character uttering his or her thoughts out loud; there is no actual audience for it within the four walls of the drama, but rather the audience outside the fourth wall overhears it. In some cases, such as the speeches of "Hamlet", the character is debating with himself.
Robert Browning's "Porphyria's Lover" is a genre known as a dramatic monologue which is a stand-alone poem, spoken in the voice of a character not identical with the poet that gradually reveals the nature of the character, often with a surprising reversal.