Closed stami closed 1 year ago
workaround for #388
Hi @JohanDegraeve if you happen to have time to review this, it would help a lot of people until we have a proper fix 😊
Happy to make any adjustments if needed.
I did try that out but it didn't work
I think you are talking about https://github.com/JohanDegraeve/xdripswift/pull/384 🤔 if not, please tell more.
I ended up implementing the ”pre-generated mp3” solution to a more completed feature, and this PR is about it.
Hi, any chance getting a review for this? There are people asking for the feature in Facebook and this could fix the issue for many of them.
I’ve been running this without issues and will continue doing so, so I am fine with this not being merged, but I do feel a little bad for people wishing for speak readings to work even somehow…
Sure - let us get the new Libre 2 NFC re-write and other changes released and then we'll look closely at this one!
Thanks! Now that I’ve been running this branch without any other local tweaks of mine, I have noticed that the speaking does not work as expected. It misses many of times it should announce the reading and only occasionally speaks. I’ll look into it.
Hi @stami , we fixed the BG speak issue in 9380633 and it is now merged into master. We'll close this open issue/PR.
Oh, cool if it isn't crashing anymore! That's good news 👍
This PR is split to three commits.
First changes the SoundPlayer to accept multiple sound files to play at once. That is an enhancement which, although made for the workaround, can be useful even after the workaround is removed in the future.
Second commit is the actual workaround.
I generated files with https://ttsmp3.com/ and normalized their volume with Audacity, as they were a bit quiet out-of-the-box.
The logic in
BGReadingSpeaker.swift
is quite extensively commented but in short it does the following:When turned on
I don't know how to explain to users what that setting actually does, and why it doesn't work like the actual feature... 🤷 Expect confusion. 😬
Third commit fixes a cell reusing bug that appeared with disabled rows 😄