Page MenuHomePhabricator

Add option to not convert to MP3 via LAME
Closed, ResolvedPublic2 Estimated Story Points

Description

Add a configuration variable (PhonosStoreFilesAsMp3, default true) to optionally disable WAV --> MP3 conversion for the Larynx and eSpeak engines — some systems may be unable to use LAME (?) (and it makes it a little easier to test on Windows!)

Acceptance criteria

  • With $wgPhonosStoreFilesAsMp3 unset, the generated audio from Phonos should be a MP3 file
  • With $wgPhonosStoreFilesAsMp3 = true; in LocalSettings.php, the generated audio from Phonos should be a MP3 file
  • With $wgPhonosStoreFilesAsMp3 = false; in LocalSettings.php, the generated audio from Phonos should be a WAV file

Event Timeline

Change 838727 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] wgPhonosConvertToMp3: Add option to not convert to MP3 via LAME

https://gerrit.wikimedia.org/r/838727

Change 838727 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] wgPhonosStoreFilesAsMp3: Add option to not convert to MP3 via LAME

https://gerrit.wikimedia.org/r/838727

@TheresNoTime Validated the acceptance criteria are working as designed in Local as seen in the screenshots below via Chrome, Firefox, and IE. If there is anything else you would like me to test, just let me know. Otherwise, I'll be moving the task to product sign-off for now. Thanks!

With $wgPhonosStoreFilesAsMp3 unset, the generated audio from Phonos should be a MP3 file
With $wgPhonosStoreFilesAsMp3 = true; in LocalSettings.php, the generated audio from Phonos should be a MP3 file
With $wgPhonosStoreFilesAsMp3 = false; in LocalSettings.php, the generated audio from Phonos should be a WAV file

Chrome

PhonosStoredFiles_False_Chrome.png (1×1 px, 347 KB)
With $wgPhonosStoreFilesAsMp3 = false; in LocalSettings.php, the generated audio from Phonos should be a WAV file

PhonosStoredFiles_True_Chrome.png (1×1 px, 330 KB)
With $wgPhonosStoreFilesAsMp3 = true; in LocalSettings.php, the generated audio from Phonos should be a MP3 file

PhonosStoredFiles_Unset_Chrome.png (806×1 px, 266 KB)
With $wgPhonosStoreFilesAsMp3 unset, the generated audio from Phonos should be a MP3 file

Firefox-Same screenshots as Chrome. An example of being "false" in Firefox

PhonosStoredFiles_FF.png (545×1 px, 152 KB)
With $wgPhonosStoreFilesAsMp3 = false; in LocalSettings.php, the generated audio from Phonos should be a WAV file

IE -Same screenshots as Chrome. An example of being "false" in IE

PhonosStoredFiles_IE.png (564×1 px, 157 KB)
With $wgPhonosStoreFilesAsMp3 = false; in LocalSettings.php, the generated audio from Phonos should be a WAV file

Should we make the same change to the GoogleEngine? GoogleEngine does not use Lame, and while avoiding Lame seems to be the intent of this task, the config setting implies you won't get MP3 when you still will with Google. It's easy to fix, if we want to ('audioEncoding' => 'LINEAR16' instead of => 'MP3').

NRodriguez subscribed.

Should we make the same change to the GoogleEngine? GoogleEngine does not use Lame, and while avoiding Lame seems to be the intent of this task, the config setting implies you won't get MP3 when you still will with Google. It's easy to fix, if we want to ('audioEncoding' => 'LINEAR16' instead of => 'MP3').

@MusikAnimal open to doing that for a different task but resolving this one for now

Change 894705 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Phonos@master] Remove $wgPhonosStoreFilesAsMp3

https://gerrit.wikimedia.org/r/894705

Change 894705 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Remove $wgPhonosStoreFilesAsMp3

https://gerrit.wikimedia.org/r/894705