We report on the calculation of the frequency-dependent conductivity of the quantum Hall stripes and bubble crystals that form in high Landau level. We use the replica and Gaussian variational methods (GVM) with a dynamical matrix obtained from the time-dependent Hartree-Fock approximation. In the stripe state, we go beyond the semiclassical approximation of the saddle point equations obtained with the GVM and demonstrate the existence of a quantum depinning transition as a function of filling factor. Below a critical filling factor, the pinned state is described by a replica symmetry breaking (RSB) solution that gives resonant peaks in the frequency-dependent conductivity in both directions, parallel and perpendicular to the stripes orientation. These peaks shift to zero frequency as the critical filling is approached. Above the critical filling, we find a depinned stripe state described by a partial replica symmetry breaking solution in which there is free sliding only along the stripe direction. The transition has a Kosterlitz-Thouless character and includes a jump in the low-frequency exponent of the dynamical conductivity. In the bubble crystals a semiclassical approximation yields a pinning peak frequency and resonance width that generally decrease with increasing filling factor, in accordance with recent microwave absorption experiments.