Arrhythmia is characterized by aberrant electrical activity of the heart, which can be identified the changes in the Electrocardiogram (ECG). Automatic ECG detection is needed because it is mainly used for detecting arrhythmias. Although several algorithms are implemented for the automatic classification of cardiac arrhythmias based on the characteristics of the ECG, their stratification rate is very less because of the unreliable features of signal characteristics or limited generalization capability of the classifier and it is still difficult to diagnose the arrhythmia disease automatically. At this work, they propose a new hybrid deep learning technique for the classification of arrhythmia from the ECG signal. Initially, the wanted ECG signal is collected from the standard websites and then it is assigned to the preprocessing technique. The preprocessing techniques includes the artifacts removal and peak detection techniques noise removal for the elimination of the unwanted distortions and the noise present in the signal then the resultant signal is fed to the Short-time Fourier transform (STFT) to achieve the spectrogram signals and then the spectrogram signal. Thus, the resultant spectrogram signal is given to the hybrid deep learning architecture that includes the 3DCNN-ResNet for diagnosing the arrhythmia disease. Here, the parameter optimizations take place using the hybrid Artificial Showering Dolphin Swarm Optimization (ASDSO) to increase the classification performance. It classifies the signal into five prominent classes that is Premature Ventricular Contraction (V), Right Bundle Branch Block (RBBB or R), Normal Sinus Rhythm (N), Left Bundle Branch Block (LBBB or L), and Atrial Premature Beat (A). The success of the proposed model is validated through diverse benchmark datasets with the performance validation like recall, precision, accuracy, f-measure and some negative measures.