So is that Rami Malek's voice in Bohemian Rhapsody?
Well, yes and no. Mostly no. It would be too convenient if Rami Malek could not only look like Mercury just by adding a stache and a pair of honkin' big teeth, but also sound exactly like him. It's difficult to overstate the unique vocal talents Mercury possessed, and it would be absurd to think that anyone -- let alone an actor capable of leading a big-budget biopic -- could adequately recreate his singing ability. A widely shared academic study, for example, found that while his legendary four-octave range was probably a myth bolstered by his frequent use of falsetto, the Queen frontman had such vocal control that he created subharmonics more associated with Tuvan throat singing than classical or other Western music. That's before getting into his vibrato; the study found that not only was Mercury able to perform tremolo at a higher speed than most singers, he could also change the rate, making it faster or slower. In other words, that trembling sound on held notes that you hear opera singers pull off manifested in a singular way in Mercury.
All this to say: Rami Malek never had a shot at recreating Freddie Mercury's voice.
How did Bohemian Rhapsody actually recreate Freddie Mercury's voice?
The way this imperfect universe works, Malek's physical impression of Mercury is the star. It's so good and so over-the-top that it makes the general badness of the rest of the movie even more jarring. The good news is at least the songs sound great, because they're pretty much recreations of the studio recordings you hear anytime you play a Queen album.
According to Rolling Stone, when not taken from the actual album tracks, most of the singing in Bohemian Rhapsody relies on isolated master tracks of Mercury's voice from his studio recordings, mashed together with Canadian Christian rock singer Marc Martel, whose ability to copy Mercury's voice is so uncanny you really just have to hear it for yourself.