Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include waveform when sending voice messages #1650

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

julioromano
Copy link
Contributor

  • New AudioLevelCalculator that outputs dB0v rescaled to the [0;1] range.
  • VoiceRecorder now stores the audio levels sampled while recording, then resamples them to 100 samples to use as waveform preview.
  • Waveform data is carried all the way as a List<Float> and converted to List<Int> in the [0;1024] range as per matrix spec only before sending it.

@julioromano julioromano self-assigned this Oct 26, 2023
@julioromano julioromano requested a review from a team as a code owner October 26, 2023 14:30
@julioromano julioromano requested review from bmarty and removed request for a team October 26, 2023 14:30
- New `AudioLevelCalculator` that outputs dB0v rescaled to the [0;1] range.
- `VoiceRecorder` now stores the audio levels sampled while recording, then resamples them to 100 samples to use as waveform preview.
- Waveform data is carried all the way as a `List<Float>` and converted to `List<Int>` in the [0;1024] range as per matrix spec only before sending it.
@julioromano julioromano requested review from jonnyandrew and removed request for bmarty October 26, 2023 14:56
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/4AaP6d

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (030e86f) 63.01% compared to head (ef9e448) 63.03%.
Report is 26 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1650      +/-   ##
===========================================
+ Coverage    63.01%   63.03%   +0.02%     
===========================================
  Files         1204     1205       +1     
  Lines        31013    31039      +26     
  Branches      6389     6395       +6     
===========================================
+ Hits         19543    19566      +23     
  Misses        8528     8528              
- Partials      2942     2945       +3     
Files Coverage Δ
...messages/composer/VoiceMessageComposerPresenter.kt 91.83% <100.00%> (+0.17%) ⬆️
.../libraries/voicerecorder/api/VoiceRecorderState.kt 100.00% <100.00%> (ø)
.../libraries/voicerecorder/impl/VoiceRecorderImpl.kt 93.22% <100.00%> (+0.91%) ⬆️
...icerecorder/impl/audio/DBovAudioLevelCalculator.kt 100.00% <100.00%> (ø)
.../libraries/voicerecorder/test/FakeVoiceRecorder.kt 94.87% <100.00%> (+0.42%) ⬆️
...oid/libraries/voicerecorder/impl/audio/Resample.kt 78.57% <78.57%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jonnyandrew jonnyandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@julioromano julioromano merged commit 00d24ce into develop Oct 26, 2023
16 checks passed
@julioromano julioromano deleted the julioromano/send_waveform branch October 26, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants