Al-Fayyoomi (may Allah have mercy on him) said:
The babgha’ (parrot) is a well-known bird. The word babgha’ may be masculine or feminine, and the plural is Babghawaat.
Al-Misbaah al-Muneer fi Ghareeb al-Sharh al-Kabeer, 1/35
It seems that it is not prescribed to return the greeting of a parrot which has learnt how to say salaams, because saying salaam is an act of worship and a supplication which requires intention on the part of the one who said it, and there is no such intention on the part of this trained creature. So one should not return its greeting. The ruling is the same as that on a tape on which the greeting is recorded and can be heard. It is transmission of sound and does not come under the ruling on greeting when it is broadcast live, in which case returning the greeting is prescribed and is a communal obligation (fard kifaayah).
Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allah have mercy on him) said:
Sometimes the greeting may be recorded and they put it on the tape and run it. If it is recorded then you are not obliged to return the greeting, because this is just transmission of sound.
Liqa’ al-Bab al-Mmaftooh, 28/229
See the rest of the fatwa and details on this issue in the answer to question number 128737.
Based on that, the parrot does not intend to give the greeting of salaam, because it does not possess the power of reason, and when it speaks it is just repeating what it has been taught, without meaning what it says.
Some of the scholars have stated that it is not prescribed to prostrate if one hears a verse from a parrot or from a recorded tape.
One of the conclusions of the book Bahjat al-Asma‘ fi Ahkaam al-Samaa‘ fi’l-Fiqh al-Islami by Prof. ‘Ali ibn Dhariyaan ibn Faaris al-Hasan al-‘Anzi (published by Dar al-Manaar in Kuwait) is:
The listener need not do the prostration of recitation if he hears it from a source that is not human, such as a trained bird like a parrot or hearing it from an echo. End quote.
And Allah knows best.