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

Add new voices #1

Open
7 of 29 tasks
oscie57 opened this issue Apr 23, 2022 · 31 comments
Open
7 of 29 tasks

Add new voices #1

oscie57 opened this issue Apr 23, 2022 · 31 comments

Comments

@oscie57
Copy link
Owner

oscie57 commented Apr 23, 2022

I am sure there are TTS voices for other languages, so maybe try and figure out the options?

  • English
  • Arabic
  • German
  • Spanish
  • Suomi
  • French
  • French (CA)
  • Indonesian
  • Japanese
  • Korean
  • Malay
  • Russian
  • Thai
  • Tieng Viet
  • Chinese Simp
  • Chinese Trad
  • Hebrew
  • Cebuano
  • Cestina
  • Italian
  • Magyar
  • Netherlandish
  • Polish
  • Romanian
  • Svenska
  • Filipino
  • Greek
  • Ukrainain
  • Hindi

These are all the languages supported in the app.

@gitlimes
Copy link
Contributor

I don't think TTS is available for all of the languages, though. Like, I tried everything from it_000 to it_030 (and also it_it_000 to it_it_030) and all gave me the same error (The currently used timbre has been offline). Might write a script or something to test it

@gitlimes
Copy link
Contributor

gitlimes commented Apr 25, 2022

Alright, here's the voices i found with the script (tested 000-046 at time of writing):

br_001     Brazilian F1
br_003     Brazilian F2
br_004     Brazilian F3
br_005     Brazilian F4
de_001     German F1
de_002     German F2
en_au_001  Australian English F
en_au_002  Australian English M
en_uk_001  British English M1
en_uk_003  British English M2
en_us_001  American English F1
en_us_002  American English F1 (duplicate)
en_us_006  American English M1
en_us_007  American English M2
en_us_009  American English M3
en_us_010  American English M4
es_002     Spanish M
es_mx_002  Mexican Spanish M
fr_001     French M1
fr_002     French M2
id_001     Indonesian F
jp_001     Japanese F1
jp_003     Japanese F2
jp_005     Japanese F3
jp_006     Japanese M
kr_002     Korean M1
kr_003     Korean F
kr_004     Korean M2

@oscie57
Copy link
Owner Author

oscie57 commented Apr 25, 2022

I don't think TTS is available for all of the languages, though. Like, I tried everything from it_000 to it_030 (and also it_it_000 to it_it_030) and all gave me the same error (The currently used timbre has been offline). Might write a script or something to test it

me and a friend found out that italy doesnt have access to the tts so it makes sense

@gitlimes
Copy link
Contributor

gitlimes commented Apr 25, 2022

I don't think TTS is available for all of the languages, though. Like, I tried everything from it_000 to it_030 (and also it_it_000 to it_it_030) and all gave me the same error (The currently used timbre has been offline). Might write a script or something to test it

me and a friend found out that italy doesnt have access to the tts so it makes sense

Ah, I see. Oof for SpaghettiLand I guess

@oscie57
Copy link
Owner Author

oscie57 commented Apr 29, 2022

what voice is https://vm.tiktok.com/ZMLG634wt/

@oscie57
Copy link
Owner Author

oscie57 commented May 3, 2022

@bulieme
Copy link

bulieme commented May 23, 2022

Alto:
https://www.tiktok.com/@kkbutterfly27xxxx/video/7100492686162922757

I cant remember who.
https://www.tiktok.com/@scotttenormansgf/video/7100227167811915054?is_copy_url=1&is_from_webapp=v1

There's a new text to speech that can sing, Its 2 voices, Alto, and others... i cant remember who is those

EDIT: Alto, Tenor sings.

@DetachHead
Copy link
Contributor

i found the narrator and singing voices #11

@oscie57
Copy link
Owner Author

oscie57 commented Jul 24, 2022

@ashmonty wondering if you can run that script again? possibly could pick up some new voices that ive seen around

@gitlimes
Copy link
Contributor

@ashmonty wondering if you can run that script again? possibly could pick up some new voices that ive seen around

Alrighty! Do keep in mind that the script only checks for languages, not for special voices

@gitlimes
Copy link
Contributor

Update: found the same voices in this list

@oscie57
Copy link
Owner Author

oscie57 commented Jul 24, 2022

ahh shit

@oscie57
Copy link
Owner Author

oscie57 commented Nov 4, 2022

"en_us_ghostface": "Scream",
"en_male_grinch": "Trickster",
"en_male_wizard": "Magician",
"en_female_ht_f08_halloween": "Opera",
"en_female_madam_leota": "Madame Leota",
"en_male_ghosthost": "Ghost Host",
"en_male_pirate": "Pirate",
"en_female_ht_f08_glorious": "Euphoric",
"en_male_sing_funny_it_goes_up": "Hypetrain",
"en_female_samc": "Empathetic",
"en_male_cody": "Serious",
"en_female_ht_f08_wonderful_world": "Melodrama",
"en_male_m2_xhxs_m03_silly": "Quirky Time",
"en_male_funny": "Wacky",
"en_female_emotional": "Peaceful",
"en_male_m03_sunshine_soon": "Toon Beat",
"en_female_f08_warmy_breeze": "Open Mic",
"en_male_m03_lobby": "Jingle",
"en_female_f08_salut_damour": "Cottagecore",
"es_mx_002": "Warm",
"en_male_narration": "Story Teller",
"en_us_007": "Professor",
"en_us_009": "Scientist",
"en_us_010": "Confidence",
"en_us_006": "Joey",
"en_au_001": "Metro",
"en_uk_001": "Narrator",
"en_us_002": "Jessie",
"en_au_002": "Smooth"

gotten by https://github.com/Wolfhound905

@alexdo83
Copy link

@oscie57 Voice Codes vietnamese?

@Iucasmaia
Copy link

How can i get voice codes for my language?

@Iucasmaia
Copy link

Iucasmaia commented Jan 27, 2023

"en_female_grandma": "Grandma", "en_male_joker": "Joker", "en_male_goblin": "Goblin", "en_male_grinch": "Grinch",

@MrPromotor
Copy link

does anyone know the code for the new TiktokVoice from optimus prime?

@ClaudioBo
Copy link

does anyone know the code for the new TiktokVoice from optimus prime?

I also need it too, but the Spanish (Latin American) Optimus Prime

@ClaudioBo
Copy link

Recently for Spanish tiktok I got these voices, including Optimus Prime (not english):

  • es_male_m3 - Julio
  • es_mx_male_transformer - Optimus Prime (Heavily bass boosted)
  • es_mx_female_supermom - Super Mom
  • es_female_f6 - Alejandra
  • es_female_fp1 - Mariana

@ExDrill
Copy link

ExDrill commented Jul 6, 2023

@ClaudioBo How are you getting these voice codes?

@DetachHead
Copy link
Contributor

i'm not sure how others have been doing it but i was using https://github.com/NSExceptional/FLEXing on a jailbroken iOS device.

i can't remember the exact steps i took because i can't get it working on my current device but i just looked through all the menus and searched for known voice names as i used them in the app. that helped me find where to look for unknown voice names and from there i was able to find new ones

@chrisjp
Copy link

chrisjp commented Jul 6, 2023

I didn't see anyone mention it here, you appear to be missing en_male_santa and en_male_cupid

@ClaudioBo
Copy link

ClaudioBo commented Jul 13, 2023

@ExDrill This is how I got those Voice IDs:

Requirements

  • A Android device (Rooting is NOT required)
  • A throw away Tiktok account (Optionally, you may get banned if you do care, i didn't got banned yet tho')
  • HTTP Toolkit both on your phone and computer

Steps

  1. Install a modified Tiktok .apk from the Releases of this repository: https://github.com/Eltion/Tiktok-SSL-Pinning-Bypass (Tiktok is protected from any MITM attacks if your connection doesn't use their internal certificate, so this modified apk removes it... and the method we're about to use is based on a MITM proxy)
  2. Open the installed Tiktok and login via phone number/mail (don't use any SSO i.e. Google because it will not work)
  3. Install HTTP Toolkit to intercept and analyze Tiktok traffic from the Play Store and install the included certificate from the app (the app will guide you)
  4. On your computer on HTTP Toolkit select "Android device via QR code" and follow the steps shown on screen
  5. When your phone is connected to your computer via HTTP Toolkit, on your phone select that you only want to intercept traffic from Tiktok ('ALL APPS' button > Three dots > Disable all apps > Search and select Tiktok)
  6. Go back to Tiktok, record a quick video, write any text and try to use the TTS so Tiktok will request the voice endpoint and HTTP Toolkit would grab that information and show it on your computer
  7. Search for /media/api request and see the URL parameters when you find one
  8. Voila!

image


Having said the above, I want to ask the following providing the next information:

Voice list endpoint

So my idea is getting all the Voices IDs of a language by only giving the Country Code to get the available voices, instead of depending on random people to replicate the steps mentioned above to get their available voices of their country.

Obviously Tiktok queries the voice list from somewhere, so I did saw all the requests intercepted on HTTP Toolkit using my steps above and found the endpoint (/effect/api/v3/effects), query parameters ('panel=speaking-voice' is to get only the voices) and headers that Tiktok sends to that endpoint, but I can't replicate it on a cURL command because I get a empty JSON response ({}) and a 403 HTTP status code

If anybody is interested and curious enough, I hope this little information that I've found helps you (and helps everyone else who uses this whole TTS service thing)

(Changing Tiktok language doesn't work, I dont know if it works by changing the phone's system language, or using a proxy... I don't know if using a proxy is possible because HTTP Toolkit is a local proxy)
(Explaination on Step 1 may be inaccurate, sorry if im stupid lol)

@chrisjp
Copy link

chrisjp commented Jul 14, 2023

found the endpoint (/effect/api/v3/effects), query parameters ('panel=speaking-voice' is to get only the voices) and headers that Tiktok sends to that endpoint, but I can't replicate it on a cURL command because I get a empty JSON response ({}) and a 403 HTTP status code

You were probably doing a POST request when it only accepts GET; my cURL requests attempting to replicate it gave specific error messages regarding what data was missing. So after much trial and error I now know which params are required. However, I need to do further testing with language and region parameters (there are a total of 6 region parameters and 3 language parameters being sent with the request) to determine what each one is actually for and if it affects the JSON returned. I'm sure there must be a way to get other language's voices from a properly crafted request.

Anyway, it requires a LOT more parameters than just panel (see screenshot below). The important one being a valid access_key - which is the current problem I'm having in generating - I don't know how/where this is created. It is NOT the same as the session ID we get from login cookies. If I can figure out how to reliably craft a working cURL request I'll let you guys know, but for now it seems HTTP Toolkit will be a requirement to obtaining a valid key.

image

In the meantime, I have managed to obtain all the missing English voice IDs which I'll post here later - I need to do some more testing first.

Thanks again for posting those steps @ClaudioBo, it was extremely helpful.

@chrisjp
Copy link

chrisjp commented Jul 14, 2023

I figured out the request for fetching voices list JSON for each language!

Bad news it requires an access_key which as far as I can tell is generated inside the app somewhere, so use of HTTP Toolkit and the modified TikTok .apk linked in @ClaudioBo's above comment is absolutely required to obtain this. Unless of course someone is willing to publicly share theirs - I've no idea what the ramifications of doing so might be but I wouldn't have thought it's a good idea unless it's from a throwaway account.

Here's some quick and dirty documentation for it based on my testing...

API endpoint

GET https://api31-normal-useast2a.tiktokv.com/effect/api/v3/effects

Required parameters

  • access_key - 32 char alphanumeric string, looks like it might be an md5 hash. Seems to be generated in the app. No cookies generated by the website contain this value. You'll need HTTP Toolkit to find this.
  • app_version - self-explanatory. 30.1.2 is the value I'm using, matches the modified .apk
  • sdk_version - unsure which SDK this refers to, possibly something internal. 14.3.0 is a working value.
  • device_id - a 19-digit numeric [0-9] ID. You can fake this. 1234567890123456789 will work.
  • device_platform - Must be android. I didn't find any other working values.
  • device_type - model ID of your device. My emulator uses SM-G988N. You can probably put anything you want here.
  • channel - Presumably the store the app was acquired from. googleplay works here.
  • panel - Panel is what TikTok calls each of its effect categories or something. You need to put speaking-voice for this.

Optional parameters

region - 2-letter uppercase country code. Defaults to US if not set.
carrier_region - 2-letter uppercase country code. Defaults to US if not set. On your device this will be the country it's physically located in based on SIM card network you're connected to.

You'll need to include both of the above parameters if you want voices specific to a region. Note that although we have voice IDs for France, Germany, Spain, and South Korea; using any of their country codes will only return the default English voice options. I don't know what's happened to those original ones but they do still work if used. Also, I suspect China uses a separate API as setting CN here also returns only the default English voices.

Full URL example

https://api31-normal-useast2a.tiktokv.com/effect/api/v3/effects?access_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&app_version=30.1.2&sdk_version=14.3.0&device_id=1234567890123456789&device_platform=android&device_type=SM-G988N&channel=googleplay&region=US&carrier_region=US&panel=speaking-voice
you'd need a valid access_key in that for this to work, but no special headers need to be set. You could open it in your browser if you wanted to.

I hope this proves helpful to others.

@chrisjp
Copy link

chrisjp commented Jul 16, 2023

Full list of voices

Names are as shown in the app for that language, additional names in parentheses are either what other languages call the voice or is suggested by the id for it.

I haven't tried every region code in the world but I did try every one listed in the original post, and combined with old voice IDs we already knew of this is what I believe is now a fully complete list.

English

Voice ID Name
en_uk_001 Narrator (Chris)
en_uk_003 UK Male 2
en_female_emotional Peaceful
en_au_001 Metro (Eddie)
en_au_002 Smooth (Alex)
en_us_002 Jessie
en_us_006 Joey
en_us_007 Professor
en_us_009 Scientist
en_us_010 Confidence
en_female_samc Empathetic
en_male_cody Serious
en_male_narration Story Teller
en_male_funny Wacky
en_male_jarvis Alfred
en_male_santa_narration Author
en_female_betty Bae
en_female_makeup Beauty Guru
en_female_richgirl Bestie
en_male_cupid Cupid
en_female_shenna Debutante
en_male_ghosthost Ghost Host
en_female_grandma Grandma
en_male_ukneighbor Lord Cringe
en_male_wizard Magician
en_male_trevor Marty
en_male_deadpool Mr. GoodGuy (Deadpool)
en_male_ukbutler Mr. Meticulous
en_male_petercullen Optimus Prime
en_male_pirate Pirate
en_male_santa Santa
en_male_santa_effect Santa (w/ effect)
en_female_pansino Varsity
en_male_grinch Trickster (Grinch)
en_us_ghostface Ghostface (Scream)
en_us_chewbacca Chewbacca (Star Wars)
en_us_c3po C-3PO (Star Wars)
en_us_stormtrooper Stormtrooper (Star Wars)
en_us_stitch Stitch (Lilo & Stitch)
en_us_rocket Rocket (Guardians of the Galaxy)
en_female_madam_leota Madame Leota (Haunted Mansion)
en_male_sing_deep_jingle Song: Caroler
en_male_m03_classical Song: Classic Electric
en_female_f08_salut_damour Song: Cottagecore (Salut d'Amour)
en_male_m2_xhxs_m03_christmas Song: Cozy
en_female_f08_warmy_breeze Song: Open Mic (Warmy Breeze)
en_female_ht_f08_halloween Song: Opera (Halloween)
en_female_ht_f08_glorious Song: Euphoric (Glorious)
en_male_sing_funny_it_goes_up Song: Hypetrain (It Goes Up)
en_male_m03_lobby Song: Jingle (Lobby)
en_female_ht_f08_wonderful_world Song: Melodrama (Wonderful World)
en_female_ht_f08_newyear Song: NYE 2023
en_male_sing_funny_thanksgiving Song: Thanksgiving
en_male_m03_sunshine_soon Song: Toon Beat (Sunshine Soon)
en_female_f08_twinkle Song: Pop Lullaby
en_male_m2_xhxs_m03_silly Song: Quirky Time

French

Voice ID Name
fr_001 French Male 1
fr_002 French Male 2

German

Voice ID Name
de_001 German Female
de_002 German Male

Indonesian

Voice ID Name
id_male_darma Darma
id_female_icha Icha
id_female_noor Noor
id_male_putra Putra

Italian

Voice ID Name
it_male_m18 Italian Male

Japanese

Voice ID Name
jp_001 Miho (美穂)
jp_003 Keiko (恵子)
jp_005 Sakura (さくら)
jp_006 Naoki (直樹)
jp_male_osada モリスケ (Morisuke)
jp_male_matsuo モジャオ (Matsuo)
jp_female_machikoriiita まちこりーた (Machikoriiita)
jp_male_matsudake マツダ家の日常 (Matsudake)
jp_male_shuichiro 修一朗 (Shuichiro)
jp_female_rei 丸山礼 (Maruyama Rei)
jp_male_hikakin ヒカキン (Hikakin)
jp_female_yagishaki 八木沙季 (Yagi Saki)

Korean

Voice ID Name
kr_002 Korean Male 1
kr_004 Korean Male 2
kr_003 Korean Female

Portuguese

Voice ID Name
br_003 Júlia
br_004 Ana
br_005 Lucas
pt_female_lhays Lhays Macedo
pt_female_laizza Laizza
pt_male_transformer Optimus Prime (Portuguese)

Spanish

Voice ID Name
es_002 Spanish Male
es_male_m3 Julio
es_female_f6 Alejandra
es_female_fp1 Mariana
es_mx_002 Álex (Warm)
es_mx_male_transformer Optimus Prime (Mexican)
es_mx_female_supermom Super Mamá

Duplicated voices removed from the above table

  • en_us_001 = en_us_002
  • br_001 = br_004
  • id_001 = id_female_noor

@thetoonsofjosh
Copy link

This is a pretty awesome list but I don't see "Italian Male" (it_male_m18 is the voice code) in the list.

@chrisjp
Copy link

chrisjp commented Jul 16, 2023

Thanks, I'll edit my comment to include that.

It was stated earlier in the thread that Italy didn't have access to TTS, and when I set IT as the region which fetching voice codes only the default English voices were returned. So it's strange this one exists. Do you know if it's still usable in the app by Italian users?
Because if it is there must be a different API call returning additional voice codes we might not know about yet.

@ClaudioBo
Copy link

es_mx_male_transformer is now unavailable now :(

@ExDrill
Copy link

ExDrill commented Dec 29, 2023

Any updates regarding voices being added?

@MrPromotor
Copy link

es_mx_male_transformer

i know, this voice was so freaking cool in the mexican voice, I don't think it come back

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

No branches or pull requests