A faucet, comprising: a base having a receiving groove, wherein the receiving groove has an opening formed on an outer surface of the base; an outlet pipe engaged with the base, wherein the outlet pipe has an inlet end and an outlet end; and an ultrasonic generator detachably disposed in the receiving groove via the opening; wherein the receiving groove is recessed into the outer surface of the base along a first axial direction to form the opening on the outer surface of the base; wherein a power switch is disposed on the base and is electrically connected between the ultrasonic generator and an external power by a wire, wherein the power switch has an operating portion disposed on the outer surface of the base for a user to turn on or off the power from the external power to the ultrasonic generator by operating the operating portion; wherein a disengaging unit is disposed on a bottom surface of the receiving groove; the disengaging unit exerts a force on the ultrasonic generator to push the ultrasonic generator in a direction toward the opening; wherein the faucet further comprises a fixing mechanism disposed on the base, wherein the fixing mechanism is adapted to restrict the ultrasonic generator in the receiving groove; wherein the fixing mechanism comprises a pressing unit and a locking unit; the pressing unit drives the locking unit to move between a first position to a second position; when the locking unit is located at the first position, the locking unit abuts against the ultrasonic generator to restrict the ultrasonic generator in the receiving groove; when the locking unit is located at the second position, the locking unit is apart from the ultrasonic generator. a base having a receiving groove, wherein the receiving groove has an opening formed on an outer surface of the base; an outlet pipe engaged with the base, wherein the outlet pipe has an inlet end and an outlet end; and an ultrasonic generator detachably disposed in the receiving groove via the opening; wherein the receiving groove is recessed into the outer surface of the base along a first axial direction to form the opening on the outer surface of the base; wherein a power switch is disposed on the base and is electrically connected between the ultrasonic generator and an external power by a wire, wherein the power switch has an operating portion disposed on the outer surface of the base for a user to turn on or off the power from the external power to the ultrasonic generator by operating the operating portion; wherein a disengaging unit is disposed on a bottom surface of the receiving groove; the disengaging unit exerts a force on the ultrasonic generator to push the ultrasonic generator in a direction toward the opening; wherein the faucet further comprises a fixing mechanism disposed on the base, wherein the fixing mechanism is adapted to restrict the ultrasonic generator in the receiving groove; wherein the fixing mechanism comprises a pressing unit and a locking unit; the pressing unit drives the locking unit to move between a first position to a second position; when the locking unit is located at the first position, the locking unit abuts against the ultrasonic generator to restrict the ultrasonic generator in the receiving groove; when the locking unit is located at the second position, the locking unit is apart from the ultrasonic generator.