Amazing Python Project in 10 lines Code - Python Small Project in 10 Lines Code.
Simple Project in Python - small project in python with source code - python projects for beginners - python projects with source code
Five Amazing Python Project with code
1) Audio Book Python Project.
2) Voice Recorder Python Project.
3) Extract Mp3 From Mp4.
4) Password Protect PDF.
5) Merge Multiple PDF.
1) Audio Book Python Project
Audio Book Python Project is simple read text from file and speak that file text and its simple python project for student.
1 import pyttsx3
2 book - open ( r " book.txt " )
3 book_text = book.readlines ( )
4 engine = pyttsx3.init ( )
5 for i in book_text :
6 engine.say ( i )
7 engine.runAndWait ( )
2) Voice Recorder Python Project
Voice Recorder Python Project is simple Record you voice and save in your computer or laptop Simple Voice Record python project with source code for student.
1 import sounddevice
2 from scipy.io.wavfile import write
3 fs = 44100 #sample_rate
4 second = int ( input ( " Enter the time duration in second : " ) ) #enter your required time ..
5 print ( " Recording .... \ n " )
6 record_voice - sounddevice.rec ( int ( second fs ) , samplerate = fs , channels = 2 )
7 sounddevice.wait ( )
8 write ( " out.wav " , fs , record_voice )
9 print ( " Finished ... \ nPlease Check it ... " )
3) Extract mp3 from mp4 Python Project
Extract mp3 from mp4 Python Project for student with source code is simple take your video and convert in audio. its just extract audio from video. take audio from video.
1 import moviepy
2 import moviepy.editor
3 # Put your file path in here
4 video = moviepy.editor.VideoFileClip ( " " )
5 audio = video.audio
6 audio.write_audiofile ( ' new_audio.mp3 ' )
4) Password Protect PDF Python Project
Password Project PDF Python Project for student with source code is simple make your PDF Password Protect with python project with source code.
1 from PyPDF2 tmport PdfFileWriter , PdfFileReader
2 Import getpass
3 pdfwriter = PdfFileWriter ( )
4 pdf PdfFileReader ( " 1.pdf " )
5 for page_num in range ( pdf.numPages ) :
6 pdfwriter.addPage ( pdf.getPage ( page_num ) )
7 passw - getpass.getpass ( prompt = ' Enter Password : ' )
8 pdfwriter.encrypt ( passw )
9 with open ( ' ho.pdf ' , ' wb ' ) as f :
10 pdfwriter.write ( f )
5) Merge Multiple PDF Python Project
Merge Multiple PDF Python Project for student with source code is simple merge PDF in python project with source code.
1 from PyPDF2 Unport PdfFileMerger
2 import os
3 #var os.getcudf ) For extracting from enother folder
4 merger Pdf FileMerger ( )
5 for items in os.listdir ( ) :
6 if items.endswith ( .pdf ) :
7 merger.append ( items )
8 merger.write ( " Final_pdf.pdf " )
9 merger = Pdf FileMerger ( )
10 with open ( originalFile , ' rb ' ) as fin :
11 merger.append ( Pdf FileReader ( fin ) )
12 os.remove ( originalFile )
13 merger.close ( )
0 Comments