Hi there,
the speaker will filter some high frequency signals(48Khz). But it only passes the frequency below 16khz. then you record the 16khz signals. you can consider to buy grove-ultrasonic sensor to do the experiment. thanks.
http://wiki.seeedstudio.com/Grove-Ultrasonic_Ranger/