Does a person in captivity recite the blessing of Shelo Asani Aved?
Even a person in captivity is to recite the blessing of Shelo Asani Aved.
Does a convert say the blessing of “Shelo Asani Goy”?
There are opinions which say that a convert should recite the blessing of “Sheasani Ger” and is not to recite the blessing of Shelo Asani Goy. Others however rule that he may not say this blessing of “Sheasani Ger”. According to the Kabalists however, even a convert may say the blessing of “Shelo Asani Goy”. [Practically a convert may say the blessing of Shelo Asani Goy if he desires to rely on this opinion of the Kabalists. However some rule a convert is to recite the blessing of Shelo Asani Goy without Hashem’s name.]
Does a convert recite the blessing of Shelo Asani Aved?
A convert is to recite the blessing of Shelo Asani Aved.
 As the blessing is not being said out of thanks for ones physical freedom, but rather on that a Hashem did not create him as a slave which is only obligated in the Mitzvos of a woman, [as even in captivity he is obligated to fulfill all the Mitzvos just like a free man]. [ibid]
 Rama 46/4; Taz 46/5
 The Reason: He may not recite the blessing of “Shelo Asani Goy” being that he was first created as a gentile. Rather, he should recite a blessing of “that He made me a convert”, as upon his conversion he is considered liken a child that was just born and he has become newly formed and created. [ibid]
 M”A 46/10 in name of Shlah; Bach brought in Taz ibid
 Being that he converted on his own accord, and thus it is not true to say “that he was created a convert”. [ibid]
 Being that the Kabalists explain that the meaning of the blessing is to thank G-d for not attaching a soul of a gentile to him upon awakening [and this matter is equally relevant to a convert]. [ibid; and so rules M”A 46/10; Piskeiy Teshuvos 46/11; See Matzas Shmurim brought in Kaf Hachaim 46/32]
 Piskeiy Teshuvos 46/11
 Kaf Hachaim 46/36; Siddur Yaavetz
 Now although he was born a gentile which is even worse than a slave nevertheless [being born a gentile is also advantageous] being that he is able to convert and then become obligated in all the Mitzvos. However if he were to be born a slave then he would be unable to [become obligated in all the Mitzvos] unless he were to be freed from his master [which is not dependent on him]. [ibid]