Ukufunda umbhalo ngesiTshayina



Ndizibekele umsebenzi wokubhala ilizwi elisebenza kwisicatshulwa ngesiTshayina.Lo ngumcimbi olula ngokufanelekileyo ukuba sele unamava, kodwa xa uqala ukuyenza ukusuka ekuqaleni, uya kuqokelela iingxaki ezininzi kangangokuba umnqweno unokunyamalala kwangaphambili.IJavaScript lulwimi olusebenza kakhulu, lubonakala lunayo yonke into enqwenelwa yintliziyo yakho.

Makhe sijonge inguqulelo yokugqibela onokuthi uyincamathelise kwi-DevTools kwaye uyijonge.

var utterance = new SpeechSynthesisUtterance('菜');
var voices = window.speechSynthesis.getVoices();
utterance.voice = voices.filter(function(voice) { return voice.lang == 'zh-CN'; })[0];
window.speechSynthesis.speak(utterance);

zh-CN - yile ndlela ulwimi lwesiTshayina luchongwe ngayo emathunjini esiphequluli.Kwinkqubo yethu, sikhangela isikhangeli selizwi lolwimi lwesiTshayina, kwaye sizame ukuvelisa kwakhona ibinzana lethu.Akwahlukanga ekubizeni naluphi na olunye ulwimi.Kodwa kukho ii-nuances ezimbalwa apha.Ukucoca uluhlu lweelwimi ezikhoyo sidibana namazwi ama-2 aseTshayina e-zh-CN.U-Zero uya kuba lilizwi lomfazi, kwaye elokuqala lilizwi lendoda.

Owasetyhini

utterance.voice = voices.filter(function(voice) { return voice.lang == 'zh-CN'; })[0];

Indoda

utterance.voice = voices.filter(function(voice) { return voice.lang == 'zh-CN'; })[1];

Ukongeza, ukusebenza kwelizwi kuya kwahluka ukusuka kwisikhangeli ukuya kwisikhangeli kunye nakwisixhobo ukuya kwesinye.Isiphequluli se-Chrome sinamazwi aso, isiphequluli se-Edge sihluke ngokupheleleyo, sithandeka ngakumbi, ngendlela, kwaye isiphequluli se-Opera asinawo amazwi, ngoko akuyi kuba nezwi elisebenzayo.

Le khowudi inokuxhonywa kwiqhosha kwaye uthethe into yakho.

function say(voiceId){
    let text = document.getElementById("pole").innerHTML
    console.log (text)
    var utterance = new SpeechSynthesisUtterance(text);
    var voices = window.speechSynthesis.getVoices();
    utterance.voice = voices.filter(function(voice) { return voice.lang == 'zh-CN'; })[voiceId];
    window.speechSynthesis.speak(utterance);
}

kunye nekhowudi yeqhosha:

<button onclick="say(1)">👨🔉</button>

Azikho ezinye iingxaki ngokusebenza kwelizwi.Ewe, yonke into isebenza njani kwii-smartphones.Ewe, kuhle, ngakumbi kwi-browser ye-Edge yeselula.Ngendlela, ngokusekwe kobu buchwepheshe, ndizama ukwenza i-microservice yokufunda isiTshayina, nantsi:

http://jkeks.ru/china .Yonke into iphunyezwa kanye njengoko ndichaze apha.





bg bs ca ceb co cs cy da de el en eo es et fa fi fr fy ga gd gl gu ha haw hi hmn hr ht hu id ig is it iw ja jw ka kk km kn ko ku ky la lb lo lt lv mg mi mk ml mn mr ms mt my ne nl no ny or pa pl ps pt ro ru rw sd si sk sl sm sn so sr st su sv sw ta te tg th tk tl tr tt ug uk ur uz vi xh yi yo zh zu
Text to speech
QR-Code generator
Parsedown cheatsheet. Markdown
Filter data by column with regular expressions
Engines for creating games on LUA ?
JavaScript: draw a point
JavaScript: Speaking text in Chinese