Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 796325b6 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Fix bug 2449814

 Reduced the amount of filtering and amplification at the output
 of the Pico TTS engine v1.1.0.2

Change-Id: I89f577b5e94e171b4ed892faffb863f19428cc1a
parent 83835359
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -36,9 +36,9 @@ public class SynthProxy {
    // Such a huge filter gain is justified by how much energy in the low frequencies is "wasted" at
    // the output of the synthesis. The low shelving filter removes it, leaving room for
    // amplification.
    private final static float PICO_FILTER_GAIN = 5.5f; // linear gain
    private final static float PICO_FILTER_LOWSHELF_ATTENUATION = -18.0f; // in dB
    private final static float PICO_FILTER_TRANSITION_FREQ = 1100.0f;     // in Hz
    private final static float PICO_FILTER_GAIN = 4.0f; // linear gain
    private final static float PICO_FILTER_LOWSHELF_ATTENUATION = -16.0f; // in dB
    private final static float PICO_FILTER_TRANSITION_FREQ = 1000.0f;     // in Hz
    private final static float PICO_FILTER_SHELF_SLOPE = 1.0f;            // Q

    //
@@ -50,7 +50,7 @@ public class SynthProxy {
     */
    public SynthProxy(String nativeSoLib) {
        boolean applyFilter = nativeSoLib.toLowerCase().contains("pico");
        Log.v(TtsService.SERVICE_TAG, "about to load "+ nativeSoLib + ", applyFilter="+applyFilter);
        Log.v(TtsService.SERVICE_TAG, "1000 about to load "+ nativeSoLib + ", applyFilter="+applyFilter);
        native_setup(new WeakReference<SynthProxy>(this), nativeSoLib);
        native_setLowShelf(applyFilter, PICO_FILTER_GAIN, PICO_FILTER_LOWSHELF_ATTENUATION,
                PICO_FILTER_TRANSITION_FREQ, PICO_FILTER_SHELF_SLOPE);