The datasheet for the transistor that is used in your project and for most other small transistors shows the transistor's change of its capacitance with voltage change, like a varactor diode.
The input audio causes the transistor to conduct more and less which changes the voltage across it and...