Posts

Download YouTube Video Using Python

Image
Download YouTube Video Using Python    code   from __future__ import unicode_literals import youtube_dl import urllib import shutil ydl_opts = {} with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download([ 'https://www.youtube.com/watch?v=Hw3NH_-_ja8' ]) # video will downloaded at the place of python file only

Calculator Using Python

Image
Calculator Using Python CODE   a= int ( input ( "enter a number :- " )) c=( input ( "enter the operator :- " )) b= int ( input ( "enter other number :- " )) if  c== "+" :      print ( "the sum of number is" ,a+b) if  c== "-" :      print ( "the difference in number is" ,a-b) if  c== "*" :      print ( "the multiplication of number is" ,a*b) if  c== "/" :      print ( "the division of numbers is" ,a/b)

Speech To Text

Image
 Speech To Text code import  speech_recognition  as  sr r = sr.Recognizer() with  sr.Microphone()  as  source:      print ( "Speak Anything :" )     audio = r.listen(source)      try :         text = r.recognize_google(audio)          print ( "You said :  {} " .format(text))      except :          print ( "Sorry could not recognize what you said" )

MP4 To MP3

Image
 MP4 To MP3 code   from  moviepy.editor  import  * video = VideoFileClip( "name .mp4" ) audio=video.audio audio.write_audiofile( ' name .mp3' )

Text To Voice Using Python

Image
 Text To Voice Using Python code mport  pyttsx3 import  datetime engine = pyttsx3.init( 'sapi5' ) voices = engine.getProperty( 'voices' ) engine.setProperty( 'voices' , voices[ 0 ].id) def   speak ( audio ):     engine.say(audio)     engine.runAndWait() def   wishme ():     hour =  int (datetime.datetime.now().hour)      if  hour>= 0   and  hour< 12 :         speak( "good morning" )      elif  hour>= 12   and  hour<= 18 :         speak( "good afternoon" )      else :         speak( "good evening" )       speak( "hi mehul i am your assistant. how are you" )     a= input ()      if  a ==  "i am fine" :          speak( "it's good that you are fine " ) if   __name__  ==  "__main__" :     wishme()

QR Code Maker Using Pyhton

Image
QR Code Maker Using Pyhton  CODE import  pyqrcode  import  png  from  pyqrcode  import  QRCode  s =  input ( "enter the url :- " ) url = pyqrcode.create(s)    url.png(  'qrcode.png' ,  scale  =  10 )   

Design Using Python Turtle Graphics

Image
               Design Using Python Turtle Graphics CODE from  turtle  import  Turtle, Screen screen = Screen() screen.bgcolor( 'white' ) tim = Turtle() tim.color( 'red' ) tim.speed( 'fastest' ) def   square ():      for  _  in   range  ( 4 ):         tim.forward( 200 )         tim.right( 90 ) num =  75 while  num !=  0 :     square()     new_pointing = tim.heading() -  5     tim.setheading(new_pointing)     num -=  1 screen.exitonclick()