No, it wasn't Super Mario 64
[Update: And I've just been informed that Mario was voiced in Mario Teaches Typing, which predates even Hotel Mario. The original 1991 DOS version used a different actor, but a 1995 CD-ROM re-release replaced him with Martinet. However, I'm not sure whether that or Game Gallery came out first.]
Super Mario 64 introduced the world to Charles Martinet, voice actor extraordinaire who continues to lend his vocal talents to Mario and many other Mario universe characters to this day. Little do most people know that Mario 64 wasn't the first game to star Martinet as Nintendo's mustachioed mascot, thus Shane Luis of Retroware TV decided to discuss this rather obscure bit of Mario's legacy on his web series, Rerez.
In 1995, Fallout developer Interplay published Mario's Game Gallery, a collection of five traditional board and card games for the PC. A rather forgettable title, its only claim to fame was in giving Martinet a chance to shape Mario's identity. It was later rebranded as Mario's FUNdamentals, probably to position itself as an educational game and rope in unsuspecting parents.
Of course, we all know the first game to give Mario any voice at all was Hotel Mario. Imagine if that actor had become the official voice! Tears of blood would have been shed!
Mario's Game Gallery - Rerez [Retroware TV]