Skip to main content

Fahrenheit temperature and Kelvin changing in Celsius temperature with text in speech


Fahrenheit temperature and Kelvin changing in Celsius temperature with out in speech

If you want of this source code in java language so click on it

How to speech of output :

first we need to  import gtts and playsound package in python our code editer because in this program we want to speech of every output .

then we will save of this variable with obj.save("any_name.mp3"  and we also want to speech of this. after saving of this. we write like this playsound("any_name.mp3")  for speech of obj.save.

It is only for Text speech

you can also use of this code-source for text -speech 

#librery which by we can change text in speech in present of internt your system
from gtts import gTTS

#import playsound for play text speech
from playsound import playsound

#syntax of this is variable_name=gTTS(text="your text ", lang='language' ,slow=True or False)
obj=gTTS(text="text here for speeching ok my dear ",lang='en', slow=False)
#obj save like this withh anyname.mp3
obj.save("abhijeet.mp3")




How to change fahrenheit and kelvin temperature in celsius temperature 

for this first we need to show two option ahead to user that select 1 for Fahrenheit to celsius temperate 
or enter 2 for kelvin to celsius temperature 
for this we take a input 
and if user  enter  any value then we check of this. if user enter 1
then we insert if condition if

if inp==1:
ob=gTTS(text=" inter your temperature here in fahreheit ",lang='en',slow=False)
ob.save("second.mp3")
playsound("second.mp3")

inp=float(input("enter your temperature here in fahreheit "))
o=gTTS(text='it is changed temperature in fahreheit in celsius')
o.save("third.mp3")

#formula for changing fahrenheit in celsius
totall=((inp-32)/(1.8))

print(totall)
playsound('third.mp3')


but if user enter 2 then we write of this condition 

elif inp==2:
ok=gTTS(text=" inter your temperature in kelvin ", lang='en',slow=False)
ok.save("ok.mp3")
playsound("ok.mp3")
inpu_second=float(input("inter your temperature in kelvin "))

#formula for changing kelvin in celsius
to=float(inpu_second-273)

s=gTTS(text="your enter temperature has been changed in kelvin",lang='en' ,slow=False)
s.save("s.mp3")

print("your enter temperature has been changed in kelvin ")

print(to)
playsound("s.mp3")

 what happen if user did not enter both value in this case we need to show elif statement 

el=gTTS(text="sorry wrong input please try again ",lang='en',slow=False)
el.save("forth.mp3")
print("sorry wrong input please try again ")
playsound("forth.mp3")


it is all source code for this project

you can use of this sources code through copy and paste 




#librery which by we can change text in speech in present of internt your system
from gtts import gTTS

#import playsound for play text speech
from playsound import playsound

#syntax of this is variable_name=gTTS(text="your text ", lang='language' ,slow=True or False)
obj=gTTS(text="For fahreheit to celsius press 1. or kelvin to celsius press 2 ",lang='en', slow=False)
#obj save like this withh anyname.mp3
obj.save("abhijeet.mp3")

#play of this save speech with playsound function
playsound("abhijeet.mp3")


inp= int(input("please here here"))
if inp==1:
ob=gTTS(text=" inter your temperature here in fahreheit ",lang='en',slow=False)
ob.save("second.mp3")
playsound("second.mp3")

inp=float(input("enter your temperature here in fahreheit "))
o=gTTS(text='it is changed temperature in fahreheit in celsius')
o.save("third.mp3")

#formula for changing fahrenheit in celsius
totall=((inp-32)/(1.8))

print(totall)
playsound('third.mp3')
elif inp==2:
ok=gTTS(text=" inter your temperature in kelvin ", lang='en',slow=False)
ok.save("ok.mp3")
playsound("ok.mp3")
inpu_second=float(input("inter your temperature in kelvin "))

#formula for changing kelvin in celsius
to=float(inpu_second-273)

s=gTTS(text="your enter temperature has been changed in kelvin",lang='en' ,slow=False)
s.save("s.mp3")

print("your enter temperature has been changed in kelvin ")

print(to)
playsound("s.mp3")

else:
el=gTTS(text="sorry wrong input please try again ",lang='en',slow=False)
el.save("forth.mp3")
print("sorry wrong input please try again ")
playsound("forth.mp3")

Comments

Popular posts from this blog

Top 10 Data Analysis Tools For Your Business with Review Rated

  Top 10 Data Analysis Tools For Your Business with   Review and Rated            Data analysis  is one of the most backbone of the any success business now a days . you can not predict a success business without data analysis.  indirect or direct every business involve in Data analysis.  every business organization  want to make his own approach in the whole market through this Data analysis .  Example : what will demand of any product in Future    according to previous selling product or on demand  products  that why every business organization or business needs Data analysis . Here we will see that top 10 ten Data analysis Tools for your any business and if you are student and you are  interest to learn Data analysis and you need any free data analysis tool for exercise so don't  worry you will get two free tools with download link at the last of this all tools in this web page . There are manly two methods of data analysis: Qualitative Analysis Quantitative Analysis Qualitative

Function in Python programming language

  Function in Python? In Python, a function is a group of related statements that performs a specific task. Functions help break our program into smaller and modular chunks. As our program grows larger and larger, functions make it more organized and manageable. Furthermore, it avoids repetition and makes the code reusable. Syntax of Functio n def function_name ( parameters ): """ docstring """ statement(s) Above shown is a function definition that consists of the following components. Keyword  def  that marks the start of the function header. A function name to uniquely identify the function. Function naming follows the same rules of writing identifiers in Python. Parameters (arguments) through which we pass values to a function. They are optional. A colon (:) to mark the end of the function header. Optional documentation string (docstring) to describe what the function does. One or more valid python statements that make up the function body. Stateme

Glowing text in css

Glowing text in CSS Hello student in this tutorial we will see that how to make glowing text in css  so let's  break down this topic here . 1 . we taking a div or any tag, class, id for targeting text so here i am taking a id so first  we will center of this element through position absolute like this       #text  {              /* position center through position absolute*/              position :  absolute ;              top :  40 % ;              left :  50 % ;              transform :  translate ( -50 % ,  -50 % ); } 2. Again in this css we coding for text shadow like this through text-shadow carefully see of this code here and try in your code editer.             #text  {              /* position center through position absolute*/              position :  absolute ;              top :  40 % ;              left :  50 % ;              transform :  translate ( -50 % ,  -50 % );              /* text glowing like this pay attention here */              text-shadow :  0   0   4 px