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

fix: improve audio file size [WPB-10001] #3261

Merged
merged 7 commits into from
Aug 6, 2024

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Jul 31, 2024

TaskWPB-10001 [Android] Reduce the file recording file size


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Files saved in wav format are pretty big. So we decided to encode it with or without filters on wav but before sending convert with AAC encoding and decrease SAMPLING_RATE to 16k

Copy link
Contributor

@alexandreferris alexandreferris left a comment

Choose a reason for hiding this comment

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

nice work! just have 2 comments on the sampling rate and how/when we delete the used files

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

Looking good, a small suggestion, about bulletproofing the resources' closure.

@ohassine
Copy link
Member

ohassine commented Aug 1, 2024

Should we merge it into RC ?

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 2.80374% with 104 lines in your changes missing coverage. Please review.

Project coverage is 44.30%. Comparing base (fedb66d) to head (b82f773).
Report is 1 commits behind head on release/candidate.

Files Patch % Lines
.../messagecomposer/recordaudio/AudioMediaRecorder.kt 0.00% 79 Missing ⚠️
...essagecomposer/recordaudio/RecordAudioViewModel.kt 0.00% 24 Missing ⚠️
.../conversations/sendmessage/SendMessageViewModel.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/candidate    #3261      +/-   ##
=====================================================
- Coverage              44.56%   44.30%   -0.27%     
=====================================================
  Files                    453      453              
  Lines                  15192    15282      +90     
  Branches                2525     2550      +25     
=====================================================
  Hits                    6771     6771              
- Misses                  7703     7793      +90     
  Partials                 718      718              
Files Coverage Δ
...android/ui/home/conversations/model/AssetBundle.kt 45.45% <100.00%> (+2.59%) ⬆️
...recordaudio/GenerateAudioFileWithEffectsUseCase.kt 6.25% <ø> (ø)
.../conversations/sendmessage/SendMessageViewModel.kt 79.08% <50.00%> (+0.29%) ⬆️
...essagecomposer/recordaudio/RecordAudioViewModel.kt 60.26% <0.00%> (-5.21%) ⬇️
.../messagecomposer/recordaudio/AudioMediaRecorder.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fedb66d...b82f773. Read the comment docs.

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-staging-compat-pr-3261.apk is available for download

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-internal-compat-pr-3261.apk is available for download

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

@Garzas Garzas enabled auto-merge August 6, 2024 08:07
Copy link

sonarqubecloud bot commented Aug 6, 2024

@Garzas Garzas added this pull request to the merge queue Aug 6, 2024
Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-staging-compat-pr-3261.apk is available for download

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Built wire-android-internal-compat-pr-3261.apk is available for download

Merged via the queue into release/candidate with commit ed728ef Aug 6, 2024
11 of 12 checks passed
@Garzas Garzas deleted the fix/improve-audio-file-size branch August 6, 2024 09:06
@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants