TelegramSwift icon indicating copy to clipboard operation
TelegramSwift copied to clipboard

Fix airpods recording

Open dm3ch opened this issue 3 years ago • 6 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

dm3ch avatar Jun 04 '22 00:06 dm3ch

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 04 '22 00:06 CLAassistant

@overtake Sorry for the mention, but maybe you can take a look at this PR. The problem with airpods is very annoying for me and some other users.

dm3ch avatar Jun 21 '22 09:06 dm3ch

i didn't notice this PR. Sorry. anyway. fixed. thanks.

i fixed in the same way

overtake avatar Dec 30 '22 09:12 overtake

@overtake How to know when this will be released on the app store? It still does not work for me with the app store build.

DeFiYaco avatar Dec 30 '22 10:12 DeFiYaco

@overtake How to know when this will be released on the app store? It still does not work for me with the app store build.

i will send to review today. i bet on weekends or next week.

you also can switch to stable version macos.telegram.org. 9.3 coming today.

overtake avatar Dec 30 '22 10:12 overtake

Hi @overtake

Do you happen to have any updates on this PR? The bug still occurs.

coldvalsidalv avatar Jan 20 '25 17:01 coldvalsidalv