It's a very naive attempt to fix a bug with AirPods (24kHZ sample rate) recorded voice messages.
nimayusfi opened this issue · comments
It's a very naive attempt to fix a bug with AirPods (24kHZ sample rate) recorded voice messages.
I just added "resampling" code similar to what it's already there for 16kHZ. Now in my self-built version of Telegram client, I haven't got a speedup of recording and voice pitch.
Actually, it would be better to write universal re-sampling code, but I'm pretty bad in audio and in swift to do it myself.
During the research I also found that in iOS client (https://github.com/TelegramMessenger/Telegram-iOS/blob/702f2547830ca406ce41081ea4170f24533f9a01/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift ) there's pretty similar part of code for audio recording but it doesn't have transcoding and it works great with AirPods, actually I don't know why, but it's too much differences to easily port it to this project for me.
#112 #590 #692
Originally posted by @dm3ch in overtake/TelegramSwift#783