1.0.6 • Published 10 months ago

tiktok-tts-node v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

tiktok-tts-node

tiktok-tts-node is a Node.js package that allows you to convert text to speech using TikTok's text-to-speech service. This package simplifies the process of generating audio files from text, making it easy to integrate text-to-speech capabilities into your applications.

Features

  • Convert text to speech using TikTok's TTS engine.
  • Supports multiple languages and voices.
  • Easy integration with Node.js applications.
  • Lightweight and efficient.

Installation

You can install the package using npm:

npm install tiktok-tts-node

Usage

Here’s an example of how to use tiktok-tts-node:

import TikTokTTS,{ ttVoice } from "tiktok-tts-node";

const text = "Hello work!";
const sessionId = "YOUR TIKTOK SESSION ID";

let speaker = new TikTokTTS(sessionId);
speaker
  .tts(text)
  .then(() => {
    console.log("success");
  })
  .catch((e) => {
    console.log(e);
  });

TikTokTTS parameter

tts function parameter

  • text: string | require
  • speech: string | optional | default: "BV075_streaming"
  • output: string | optional | default: "audio"
  • By default https://api16-normal-c-useast1a.tiktokv.com/media/api/text/speech/invoke will be used if no customBaseUrl is specified.

Speaker Codes

The following speaker codes are supported:

LanguageSpeakerSpeaker Code
EnglishGame Onen_male_jomboy
Jessieen_us_002
Warmes_mx_002
Wackyen_male_funny
Screamen_us_ghostface
Empatheticen_female_samc
Seriousen_male_cody
Beauty Guruen_female_makeup
Bestieen_female_richgirl
Tricksteren_male_grinch
Joeyen_us_006
Story Telleren_male_narration
Mr. GoodGuyen_male_deadpool
Narratoren_uk_001
Male English UKen_uk_003
Metroen_au_001
Alfreden_male_jarvis
ashmagicen_male_ashmagic
olantekkersen_male_olantekkers
Lord Cringeen_male_ukneighbor
Mr. Meticulousen_male_ukbutler
Debutanteen_female_shenna
Varsityen_female_pansino
Martyen_male_trevor
Pop Lullabyen_female_f08_twinkle
Classic Electricen_male_m03_classical
Baeen_female_betty
Cupiden_male_cupid
Grannyen_female_grandma
Cozyen_male_m2_xhxs_m03_christmas
Authoren_male_santa_narration
Caroleren_male_sing_deep_jingle
Santaen_male_santa_effect
NYE 2023en_female_ht_f08_newyear
Magicianen_male_wizard
Operaen_female_ht_f08_halloween
Euphoricen_female_ht_f08_glorious
Hypetrainen_male_sing_funny_it_goes_up
Melodramaen_female_ht_f08_wonderful_world
Quirky Timeen_male_m2_xhxs_m03_silly
Peacefulen_female_emotional
Toon Beaten_male_m03_sunshine_soon
Open Micen_female_f08_warmy_breeze
Jingleen_male_m03_lobby
Thanksgivingen_male_sing_funny_thanksgiving
Cottagecoreen_female_f08_salut_damour
Professoren_us_007
Scientisten_us_009
Confidenceen_us_010
Smoothen_au_002
DisneyGhost Faceen_us_ghostface
Chewbaccaen_us_chewbacca
C3POen_us_c3po
Stitchen_us_stitch
Stormtrooperen_us_stormtrooper
Rocketen_us_rocket
Madame Leotaen_female_madam_leota
Ghost Hosten_male_ghosthost
Pirateen_male_pirate
FrenchFrench - Male 1fr_001
French - Male 2fr_002
SpanishSpanish (Spain) - Malees_002
Spanish MX - Malees_mx_002
PortuguesePortuguese BR - Female 1br_001
Portuguese BR - Female 2br_003
Portuguese BR - Female 3br_004
Portuguese BR - Malebr_005
Ivete Sangalobp_female_ivete
Ludmillabp_female_ludmilla
Lhays Macedopt_female_lhays
Laizzapt_female_laizza
Galvão Buenopt_male_bueno
GermanGerman - Femalede_001
German - Malede_002
IndonesianIndonesian - Femaleid_001
JapaneseJapanese - Female 1jp_001
Japanese - Female 2jp_003
Japanese - Female 3jp_005
Japanese - Malejp_006
りーさjp_female_fujicochan
世羅鈴jp_female_hasegawariona
Morio’s Kitchenjp_male_keiichinakano
夏絵ココjp_female_oomaeaika
低音ボイスjp_male_yujinchigusa
四郎jp_female_shirou
玉川寿紀jp_male_tamawakazuki
庄司果織jp_female_kaorishoji
八木沙季jp_female_yagishaki
ヒカキンjp_male_hikakin
丸山礼jp_female_rei
修一朗jp_male_shuichiro
マツダ家の日常jp_male_matsudake
まちこりーたjp_female_machikoriiita
モジャオjp_male_matsuo
モリスケjp_male_osada
KoreanKorean - Male 1kr_002
Korean - Femalekr_003
Korean - Male 2kr_004
VietnameseFemaleBV074_streaming
MaleBV075_streaming
OtherAltoen_female_f08_salut_damour
Tenoren_male_m03_lobby
Sunshine Soonen_male_m03_sunshine_soon
Warmy Breezeen_female_f08_warmy_breeze
Gloriousen_female_ht_f08_glorious
It Goes Upen_male_sing_funny_it_goes_up
Chipmunken_male_m2_xhxs_m03_silly
Dramaticen_female_ht_f08_wonderful_world
1.0.6

10 months ago

1.0.5

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago