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

com tld and en lang is like co.uk voice #313

Closed
ooliver1 opened this issue Aug 26, 2021 · 5 comments · Fixed by #389
Closed

com tld and en lang is like co.uk voice #313

ooliver1 opened this issue Aug 26, 2021 · 5 comments · Fixed by #389

Comments

@ooliver1
Copy link

ooliver1 commented Aug 26, 2021

Prerequisites

  • [yes] Did you make sure a similar issue didn't exist?
  • [yes] Did you update gTTS to the latest? (pip install --upgrade gTTS)
ooliver@tooty:~/projects/tooty$ python3.8 -m pip install -U gTTS
Requirement already up-to-date: gTTS in /home/ooliver/.local/lib/python3.8/site-packages (2.2.3)
Requirement already satisfied, skipping upgrade: requests in /usr/lib/python3/dist-packages (from gTTS) (2.22.0)
Requirement already satisfied, skipping upgrade: six in /usr/lib/python3/dist-packages (from gTTS) (1.14.0)
Requirement already satisfied, skipping upgrade: click in /home/ooliver/.local/lib/python3.8/site-packages (from gTTS) (8.0.1)
ooliver@tooty:~/projects/tooty$ 

Current Behaviour (steps to reproduce)

british accent not american

speech = gTTS(text=text, slow=False, lang="en", tld="com")

Expected Behaviour

american accent

Context

I would like to use the american accent too

Environment

  • gTTS version: 2.2.3
  • Operating System version: Ubuntu 20.04.2 LTS
@spareleg
Copy link

spareleg commented Nov 2, 2021

Same on arch linux. With tld set to "com" or "en" the output is British English.
However tld="us" makes it output US English. This can be used as a workaround until it fixed.

gTTS version: 2.2.3
Python 3.9.7

@ooliver1
Copy link
Author

ooliver1 commented Nov 8, 2021

us works yep, maybe edit docs for that

@ooliver1
Copy link
Author

ooliver1 commented Nov 25, 2021

it was also a very random change

@pndurette pndurette added the misc label Nov 21, 2022
@PanderMusubi
Copy link

tld isn't working at the moment, see #363 and #382

@pndurette
Copy link
Owner

pndurette commented Jan 13, 2023

@PanderMusubi This is unrelated—

The situation here is that when reaching google.com it will redirect you to the one relative to your geographical location. So the English will sound closer to the English in your locale (according to Google).

It's hard for me to test as I'm in North America, however I think here the solution is that tld="us" (as shared by @DartHeilagr above) can give US English, notwithstanding where the code is run.

The best I can do is document the behaviour.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants