Package: voix
IntroductionSay hello to a new package calledvoix!'Voix'is a french word which stands for 'Voice'. As the name suggest , It generates voice for you. Just you have to pass a piece of text. Thats it! Let's discover the details.Let's jump into codingYou know, in python , if we want to use any package, we need to import it , first.So let's do that!importvoixAsvoixhas 1 function which isspeak(), we can import this function only!fromvoiximportspeakDiscovering the 'speak()' functionOk! We are ready to get started !Thespeak()function needs 5 parameters. But 4 of them are optional . We have to pass one parameter to start our work and it istext.Let's implement this to the code.fromvoiximportspeakspeak("Here we will write the text")Congratulations!We have generated our first voice!The Lang ParameterYou might notice that the voice is generated by an English man. But we don't want it. In this scenario ,langparameter comes to play a vital role. We can pass all of these 32 languages listed below as a 'String' . But first let's see the codefromvoiximportspeakspeak("Here we will write the text","fr")#here 'fr' means frenchMore specifically, we can write:fromvoiximportspeakspeak(text="Here we will write the text",lang="fr")#here 'fr' means frenchPerfect! Now see if your favorite language is in the listSupported LanguageKey for writing codeArabicarBengalibnCzechcsDanishdnDutchnlEnglishenFinnishfiFrenchfrGermandeGreekelGujratiguHindihiHungarianhuIndonesianidItalianitJapanesejaKannadaknKoreankoMalayalammlPolishplPortugueseptRomanianroRussianruSlovakskSpanishesSwedishsvTamiltaTelunguteThaithTurkishtrUkrainianukVietnameseviBy default the language isEnglishThe save ParameterIn some cases, you might want to save the audio. For this, we can use the save parameter. It receive a Boolean (True or False). By default.Voixwill not save the audio. But manually we can do it.Let's see it in the code !fromvoiximportspeakspeak(text="Here we will write the text",lang="fr",save=True)That's it! Cool ?The FileName ParameterIf we save the audio, we will see that the audio file is saved with a name callsedefault.mp3. But we don't want that ! We need our own name.Let's see how can we do this in code.fromvoiximportspeakspeak(text="Here we will write the text",lang="fr",save=True,fileName="Biiiiig_File_Name")Now, we will see that , the audio file is named as "Biiiiig_File_Name.mp3" .The Translate ParameterWe have completed all of the features ofVoix, Now , we will learn the last feature calledTranslateCan we translate text and generate voice by the translated text using voix ? Surprisingly , the answer is YES !Now let's see it in the code !fromvoiximportspeakspeak(text="Here we will write the text",lang="fr",translate=True)By the way, I don't want to save the audio file. So I have removed it. Don't be confused !That's it ! We have completed the package calledVoixUnexpected ProblemsSometimes,Voix will not workwithout internet. So make sure that whilewe are running voix , Just turn on the internetFun Fact ðŸ˜…Voix is a very small library. It has only 90 lines of code. Whereas, The Documentation readme file has about 150 lines of code. ðŸ˜…ðŸ˜…Hope you like the package. Thanks for using itChange Log0.1.0 (06/2021)First Release