توفر هذه الحزمة طريقة بسيطة لإنشاء ملفات صوتية نصية إلى كلام من API من Tiktok من Tiktok (TTS) في Node.js.
NPM أنا tiktok-tts
const {config ، createaudiofromtext} = require ('tiktok-tts') config ('الخاص بك tiktok sessionid هنا') ؛ createaudiofromtext ('text to to to to to to to to to to to to the to to the to the to the to to the to the to to the to to the to to the to to to to to
const {config ، createaudiofromtext} = require ('tiktok-tts') config ('الخاص بك tiktok sessionid هنا') ؛ createaudiofromtext ('text to to to to to to to to to the to to the to the to the to the to the the the to the te
سيتم حفظ ملف الصوت الذي تم إنشاؤه باسم myAudio.mp3
const {config ، createaudiofromtext} = require ('tiktok-tts') config ('tiktok sessionid هنا') ؛ createaudiofromtext ('text to to to to to to to the to the to the the the the the the the the the there.
سيتم حفظ ملف الصوت الذي تم إنشاؤه باسم myAudio.mp3
داخل دليل myDirectory
.
myDirectory
يجب أن يكون دليلًا حاليًا.const {config ، createaudiofromtext} = require ('tiktok-tts') config ('الخاص بك tiktok sessionid هنا') ؛ createaudiofromtext ('text to to to tale going here' ، 'myaudio' ، 'en_us_stormtrouper') ؛
await
وظيفة createAudioFromText()
const {config ، createaudiofromtext} = require ('tiktok-tts') config ('' tiktok sessionid هنا ') ؛ وظيفة async yourfunction () {await createaudiofromtext (' text التي سيتم التحدث بها ') ؛ console.log ("ملف الصوت (" تم إنشاؤه! ") ؛} yourfunction () ؛
قم بتثبيت امتداد محرر ملفات تعريف الارتباط لمتصفحك.
تسجيل الدخول إلى Tiktok Web
أثناء وجوده على شبكة Tiktok ، افتح الامتداد وابحث عن sessionid
انسخ قيمة sessionid
. (يجب أن تكون قيمة أبجدية رقمية)
config (tiktoksessionid ، custombaseurl)
المعلمة | وصف | تقصير | يكتب |
---|---|---|---|
tiktoksessionid | Tiktok SessionId الخاص بك | null | خيط |
CustomBaseurl | عنوان optional Tiktok API المخصص اختياري | - | خيط |
بشكل افتراضي https://api16-normal-c-useast1a.tiktokv.com/media/api/text/speech/invoke
سيتم استخدامه إذا لم يتم تحديد customBaseUrl
.
https://api16-normal-c-useast1a.tiktokv.com/media/api/text/speech/invoke
https://api16-core-c-useast1a.tiktokv.com/media/api/text/speech/invoke
https://api16-normal-useast5.us.tiktokv.com/media/api/text/speech/invoke
https://api16-core.tiktokv.com/media/api/text/speech/invoke
https://api16-core-useast5.us.tiktokv.com/media/api/text/speech/invoke
https://api19-core-c-useast1a.tiktokv.com/media/api/text/speech/invoke
https://api-core.tiktokv.com/media/api/text/speech/invoke
https://api-normal.tiktokv.com/media/api/text/speech/invoke
https://api19-normal-c-useast1a.tiktokv.com/media/api/text/speech/invoke
https://api16-core-c-alisg.tiktokv.com/media/api/text/speech/invoke
https://api16-normal-c-alisg.tiktokv.com/media/api/text/speech/invoke
https://api22-core-c-alisg.tiktokv.com/media/api/text/speech/invoke
https://api16-normal-c-useast2a.tiktokv.com/media/api/text/speech/invoke
createaudiofromtext (النص ، اسم الملف ، المتحدث)
المعلمة | وصف | تقصير | يكتب |
---|---|---|---|
نص | النص المراد تحويله إلى الصوت | null | خيط |
اسم الملف | اسم الملف/المسار للملف الصوتي الذي تم إنشاؤه optional | audio | خيط |
المتحدث | رمز مكبر الصوت Tiktok optional | en_us_001 | خيط |
رموز السماعات التالية مدعومة:
لغة | المتحدث | رمز السماعة |
---|---|---|
إنجليزي | لعبة على | en_male_jomboy |
جيسي | en_us_002 | |
دافيء | es_mx_002 | |
أحمق | en_male_funny | |
يصرخ | en_us_ghostface | |
التعاطف | en_female_samc | |
جاد | en_male_cody | |
معلم الجمال | en_female_makeup | |
بيستي | en_female_richgirl | |
محتال | en_male_grinch | |
جوي | en_us_006 | |
قصة القصة | en_male_narration | |
السيد جودجوي | en_male_deadpool | |
الراوي | en_uk_001 | |
الذكور الإنجليزية في المملكة المتحدة | en_uk_003 | |
المترو | en_au_001 | |
ألفريد | en_male_jarvis | |
Ashmagic | en_male_ashmagic | |
Olantekkers | en_male_olantekkers | |
اللورد رينج | en_male_ukneighbor | |
السيد دقيق | en_male_ukbutler | |
لاول مرة | en_female_shenna | |
اسكواش | en_female_pansino | |
مارتي | en_male_trevor | |
Pop Lullaby | en_female_f08_twinkle | |
كلاسيكية كهربائية | en_male_m03_classical | |
يا صديقي | en_female_betty | |
كيوبيد | en_male_cupid | |
الجدة | en_female_grandma | |
مريح | en_male_m2_xhxs_m03_christmas | |
مؤلف | en_male_santa_narration | |
كارولر | en_male_sing_deep_jingle | |
سانتا | en_male_santa_effect | |
ناي 2023 | en_female_ht_f08_newyear | |
ساحر | en_male_wizard | |
الأوبرا | en_female_ht_f08_halloween | |
النشوة | en_female_ht_f08_glorious | |
نقص | en_male_sing_funny_it_goes_up | |
ميلودراما | en_female_ht_f08_wonderful_world | |
وقت غريب | en_male_m2_xhxs_m03_silly | |
سلمي | en_female_emotional | |
فوز تون | en_male_m03_sunshine_son | |
ميكروفون مفتوح | en_female_f08_warmy_breeze | |
جلجل | en_male_m03_lobby | |
عيد الشكر | en_male_sing_funny_thanksgiving | |
Cottagecore | en_female_f08_salut_damour | |
أستاذ | en_us_007 | |
عالم | en_us_009 | |
ثقة | en_us_010 | |
سلس | en_au_002 | |
ديزني | وجه شبح | en_us_ghostface |
Chewbacca | en_us_chewbacca | |
C3PO | en_us_c3po | |
غرزة | en_us_stitch | |
Stormtrooper | en_us_stormtrouper | |
صاروخ | en_us_rocket | |
مدام ليوتا | en_female_madam_leota | |
مضيف الأشباح | en_male_ghosthost | |
القراصنة | en_male_pirate | |
فرنسي | الفرنسية - ذكر 1 | FR_001 |
الفرنسية - ذكر 2 | FR_002 | |
الأسبانية | الإسبانية (إسبانيا) - ذكر | ES_002 |
الإسبانية MX - ذكر | es_mx_002 | |
البرتغالية | البرتغالية BR - أنثى 1 | BR_001 |
البرتغالية BR - أنثى 2 | BR_003 | |
البرتغالية BR - أنثى 3 | BR_004 | |
البرتغالية BR - ذكر | BR_005 | |
IVETE SANGALO | BP_FEMALE_IVETE | |
لوميلا | bp_female_ludmilla | |
Lhays Macedo | Pt_female_lhays | |
لازا | PT_FEMALE_LAIZZA | |
جالفاو بوينو | PT_MALE_BUENO | |
الألمانية | الألمانية - أنثى | DE_001 |
الألمانية - ذكر | DE_002 | |
إندونيسي | إندونيسي - أنثى | ID_001 |
اليابانية | اليابانية - أنثى 1 | JP_001 |
اليابانية - أنثى 2 | JP_003 | |
اليابانية - أنثى 3 | JP_005 | |
اليابانية - ذكر | JP_006 | |
りーさ | jp_female_fujicochan | |
世羅鈴 | jp_female_hasegawariona | |
مطبخ موريو | JP_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 | |
كوري | كوري - ذكر 1 | KR_002 |
كوري - أنثى | KR_003 | |
الكورية - ذكر 2 | KR_004 | |
الفيتنامي | أنثى | BV074_Streaming |
ذكر | bv075_streaming | |
آخر | ألتو | en_female_f08_salut_damour |
تينور | en_male_m03_lobby | |
أشعة الشمس قريبا | en_male_m03_sunshine_son | |
نسيم دافئ | en_female_f08_warmy_breeze | |
مجيد | en_female_ht_f08_glorious | |
ترتفع | en_male_sing_funny_it_goes_up | |
Chipmunk | en_male_m2_xhxs_m03_silly | |
دراماتيكي | en_female_ht_f08_wonderful_world |