Speech coding plays a crucial role in maintaining speech quality while optimizing network resources and expediting transmission, as well as facilitating the storage of speech data. In this paper, an adaptive method for speech coding using singular value decomposition (SVD), grey wolf optimization (GWO), and run-length encoding (RLE) was proposed. The proposed method streamlines the speech matrix through preprocessing, converting it into short intervals. Subsequently, each interval undergoes decomposition using SVD, followed by optimization of compression quality using GWO. Finally, RLE is employed as the last step to increase space-saving. The developed method was conducted on two datasets: Quran and LibriSpeech using PSNR, PSEQ, and MOS tests. The results demonstrate promising outcomes, achieving space-saving up to 89.80, 84.04, 74.76, 67.24, and 59.52, respectively, for different values of quality (10, 20, 30, 40, and 50). GWO was used to optimize the quality factor which varies in each block, further increasing the space-saving up to 85.77. The average value of PSNR was equal to 21.3, MOS = 4.71, and PSEQ was equal to 3.95. Lastly, the RLE method effectively reduced the size of speech matrices, yielding a highly satisfactory space saving of up to 90.77, while maintaining excellent speech quality.