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

Playback speed (normal rate=1.0) faster on mac m1 that other laptops #116

Closed
rickghome opened this issue Mar 1, 2023 · 15 comments
Closed
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested

Comments

@rickghome
Copy link

Something we've noticed while testing EasySpeech is that playback with same content on M1 mac plays back at a faster rate than the same exact test on other laptops (given the exact same TTS settings). Anyone else seen this?

@jankapunkt
Copy link
Member

@rickghome which browser/version did you use for the test? Maybe I can replicate this with a teammate, who owns a M1, while I still own an Intel-based Mac.

@rickghome
Copy link
Author

Tried this on both chrome and safari, and the results were the same.

@jankapunkt jankapunkt added the help wanted Extra attention is needed label Mar 11, 2023
@shubham-mathur-mdl
Copy link

it happens randomly on i9 Macbook pro also. Sometime it works perfectly, sometime I have to open the page in incognito.

@jankapunkt
Copy link
Member

jankapunkt commented Jun 5, 2023

I still wonder if this is related rather to the TTS engine implementation or on a OS level. If we get a clue on how we distinctively know to what this is related in a reproducible way then I can provide a fix.

I have unfortunately an older Mac from 2018 but I could try to check if this is Safari related or not.

@rickghome @shubham-mathur-mdl what are your MacOs / Safari versions?

@shubham-mathur-mdl
Copy link

I am using MacBook Pro 16" 2019 MacOS Ventura 13.4. I am using chrome not Safari.

@shib-heystartup
Copy link

I'm seeing the same issue.

Both Chrome and Firefox on my M1 MacBook playback at a faster rate than Safari. The rate Safari plays back at is what I would expect given the options set (both rate and pitch are set at 1).

Computer specs:

MacBook Pro 14" 2021
Apple M1 Pro Chip
Ventura 13.4

@jankapunkt
Copy link
Member

jankapunkt commented Aug 9, 2023

At what configuration (rate, pitch, voice(s)) does it sound "normal" on these browsers?

@shib-heystartup
Copy link

shib-heystartup commented Aug 9, 2023

Both Chrome and FF sound "normal" (they match Safari, by ear at least) with the following:

Rate: 0.8
Pitch: 1

Voice I'm using is Karen, if that helps. I've put their index's below 'cause they vary by browser.

Safari: EasySpeech.voices()[15];
Chrome/FF: EasySpeech.voices()[66];

I can get a sound recording if you'd like as well :)

Extra info:

Safari Version 16.5
Chrome Version 115.0.5790.170
FF Version 116.0.2

@jankapunkt
Copy link
Member

@shib-heystartup thank you for the detailed info. One more question - can you please try using the say command on your Mac M1 Terminal using the Karen voice as parameter but no arguments for pitch and rate. Do these system "defaults" also sound correct or rather slow, too?

@shib-heystartup
Copy link

OK! So, the Terminal say command with the Karen voice and no other arguments sounds correct! It sounds exactly the same as the output I get when I run it on Safari.

I'm using your demo site (https://jankapunkt.github.io/easy-speech/) to test it on browser by the way so there's none of my code messing it up. :)

@rickghome
Copy link
Author

rickghome commented Aug 10, 2023 via email

@jankapunkt
Copy link
Member

@shib-heystartup @rickghome I just have replicated this issue with a non-M1 Macbook, too.

Hardware: MacBook Air 13"; 2018 with Intel Core i5
OS: MacOS Ventura 13.4

Safarai: 16.5
Firefox: 114.0.2
Chrome: 115.05790.170
Language: en
Voice: Karen

It's exactly the behaviour, as described by @shib-heystartup

@rickghome the only thing that wonders me now is your report, that it was on correct speed on Chrome. Did you by any chance used a google voice there? I found, that the google voice provide the most coherent experience in Chrome on any device/os combination, so I would avoid to use them for testing this issue and focus on the Apple system voices (Karen, Siri, Eddy, Daniel, Shelly, Sandy etc.)

@shib-heystartup / @rick Also note, that there are multiple versions of the same voice sometimes, for example I have many voices as GB and US version as I just installed available now for testing :-)

I really like to narrow this issue down so we can find the best solution or workaround for this.

@shib-heystartup
Copy link

@jankapunkt Glad you were able to replicate!

I noticed there were multiple voice versions! I've also got multiples of US/UK voices on my Macbook. I needed an AU voice though and luckily Karen's the only one! I can't see a multiple for her.

I did just check and it's also happening with Daniel (GB) and Eddy (GB) so I suspect it's not a singular voice issue. It's weirdly very noticeable with the Eddy (GB) voice!

@jankapunkt
Copy link
Member

It's weirdly very noticeable with the Eddy (GB) voice!

I actually found this very revealing analysis: https://apple.stackexchange.com/questions/96808/what-is-the-default-speaking-rate-for-the-speech-synthesis-program

So my assumption here is, that Safari/WebKit internally has knowledge about this and makes rate=1 relative to the several voices defaults while FF/Chrome don't "know" this fact and simply send a global default rate. I will investigate further on this and check the Browser Engine implementations if they reveal something.

@jankapunkt
Copy link
Member

jankapunkt commented Aug 10, 2023

@jankapunkt jankapunkt added bug Something isn't working documentation Improvements or additions to documentation question Further information is requested and removed help wanted Extra attention is needed needs reproduction labels Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants