Text to Speech Converter Tool
Text to Speech Converter Tool includes a form with fields for entering text and selecting a voice, as well as buttons for starting and stopping the speech. The form is set to not submit to a server, so the speech is generated and played entirely within the browser.
The script tag includes the ResponsiveVoice library, which provides the text-to-speech functionality. You'll need to replace "YOUR_API_KEY" with an actual API key obtained from the ResponsiveVoice website.
The JavaScript code defines two functions: speakText() and stopSpeech(). The speakText() function retrieves the text and voice selected by the user, and uses the responsiveVoice.speak() method to generate and play the speech. The stopSpeech() function uses the responsiveVoice.cancel() method to stop the currently playing speech.
============================================================================
টেক্সট টু স্পিচ কনভার্টার টুলে টেক্সট প্রবেশ করানো এবং ভয়েস নির্বাচন করার জন্য ক্ষেত্র সহ একটি ফর্ম রয়েছে, সেইসাথে বক্তৃতা শুরু এবং বন্ধ করার জন্য বোতাম রয়েছে। ফর্মটি একটি সার্ভারে জমা না দেওয়ার জন্য সেট করা হয়েছে, তাই বক্তৃতা তৈরি হয় এবং সম্পূর্ণরূপে ব্রাউজারে চালানো হয়৷
স্ক্রিপ্ট ট্যাগে ResponsiveVoice লাইব্রেরি রয়েছে, যা টেক্সট-টু-স্পীচ কার্যকারিতা প্রদান করে। আপনাকে ResponsiveVoice ওয়েবসাইট থেকে প্রাপ্ত একটি আসল API কী দিয়ে "YOUR_API_KEY" প্রতিস্থাপন করতে হবে।
জাভাস্ক্রিপ্ট কোড দুটি ফাংশন সংজ্ঞায়িত করে:স্পিক টেক্সট() এবংস্টপ স্পিচ(). দ্যস্পিক টেক্সট() ফাংশন ব্যবহারকারী দ্বারা নির্বাচিত পাঠ্য এবং ভয়েস পুনরুদ্ধার করে এবং ব্যবহার করে ResponsiveVoice.speak() বক্তৃতা তৈরি এবং খেলার পদ্ধতি। দ্যস্টপ স্পিচ() ফাংশন ব্যবহার করে ResponsiveVoice.cancel() বর্তমানে বাজানো বক্তৃতা বন্ধ করার পদ্ধতি।
No comments:
Post a Comment