Bismihi ta'ala
There are references that when the holy Prophet (s.a.w.) went in his Mi'raj journey, Allah ta'ala communicated with the Prophet (s.a.w.), in the voice of Imam Ali (a.s.). This is among the merits of Imam Ali (a.s.).
Of course, in Sunni sources, like al-Durr al-Manthur, v. 4, p. 154-5, it says the Prophet (s.a.w.) heard the voice of Abu Bakr.
But Sunni sources also narrate it being Imam Ali (a.s.).
We have absolute belief that Allah ta'ala does not have a body, or anything material, and even in this case of "communicating", it was casting the sound.
So, the voice was not Imam Ali (a.s.), but the casting of a sound to an angel that resembled the voice of Imam Ali (a.s.), because it was the most loved of sounds for the Prophet (s.a.w.).
Some Sunni references for this narration:
al-Manaqib, by al-Khwarazmi, p. 78, p. 6, h. 61.
Yanabi' al-Mawaddah, v. 1, p. 246, h. 28.
With prayers for your success