How to rotate the camera based on the swipe gestures, its speed should be based on the gesture speed?

Rotation of the camera needs to behave like a Google Earth rotation like if you rotate fast it will rotate fast based on the momentum we apply, can somebody help me on reference?

I’ll give some general tips, since the implementation will depend heavily on your specific project.

Rotation based on swipe gesture

The main problem to solve here is determining the correct rotation axis based on the swipe direction. In most cases, your rotation axis will be "perpendicular" to your swipe direction. I used quotes because your swipe is technically a 2D screen space vector, but rotation axis is a 3D vector. However, from your point of view, they are perpendicular. In order to translate the swipe vector into a rotation vector, take advantage of the fact that the camera's transform.up and transform.right are always perfectly aligned with the screen's x and y axes.

Rotation speed based on swipe speed

Regardless of whether you're working with mouse or touch input, you will need to store the last frame's touch/mouse position in a variable. Taking the distance between the current touch/mouse position and last touch/mouse position will give you the speed that the mouse/finger has moved in the last frame update. You can use that to adjust the rotation speed.