diff --git a/.gitattributes b/.gitattributes index ad776b4c84f6ffe94524788ec50354dce7ee1ae5..00283b80176b271c7fa696b0e7cdaf0c24b4d3c9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -43,3 +43,9 @@ assets/image7.png filter=lfs diff=lfs merge=lfs -text assets/image8.png filter=lfs diff=lfs merge=lfs -text assets/image9.png filter=lfs diff=lfs merge=lfs -text assets/6.png filter=lfs diff=lfs merge=lfs -text +font/calibri.ttf filter=lfs diff=lfs merge=lfs -text +font/youyuan.TTF filter=lfs diff=lfs merge=lfs -text +type-sounds/Flacking[[:space:]]Typing.mp3 filter=lfs diff=lfs merge=lfs -text +type-sounds/RedMECH[[:space:]]Typing.mp3 filter=lfs diff=lfs merge=lfs -text +type-sounds/Smooth[[:space:]]Typing.mp3 filter=lfs diff=lfs merge=lfs -text +type-sounds/Stop[[:space:]]Tpying.mp3 filter=lfs diff=lfs merge=lfs -text diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a049862793a137d475917735eff0365c86cae929 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 PRITHIV SAKTHI U R + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9ff585c4ff8d4370634942b93653132a8c3f656a --- /dev/null +++ b/README.md @@ -0,0 +1,217 @@ +--- +title: Type Byte +emoji: 🐧 +colorFrom: blue +colorTo: yellow +sdk: gradio +sdk_version: 4.41.0 +app_file: app.py +pinned: false +license: creativeml-openrail-m +--- + +Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference + +Blog: https://huggingface.co./blog/prithivMLmods/type-byte + +# Create Dynamic Typed Videos with 'Type Byte' + +## How Type Byte Works +Type Byte simplifies the process of turning text(words and phrases) into videos through a user-friendly interface and powerful back-end technologies. Here's a breakdown of how it works: + +## 1. Composition Process +At the heart of Type Byte is the composition process. The tool combines SFX (sound effects) with text, allowing you to create a harmonious blend of visual and auditory elements. The process involves several key steps: + +**Frame and Text Colors**: You start by selecting the background (frame) color and text color. This ensures that your text stands out and aligns with your brand's aesthetic. + +**Text Sequence**: Type Byte animates your text, presenting it line by line or paragraph by paragraph, creating a typing effect that captures attention. + +**Sound Effects**: Adding sound effects enhances the viewing experience, making your video more immersive. + +## 2. Customization Options +Type Byte offers a range of customization options, ensuring that your video is tailored to your specific needs. You can choose from various: + +| **Feature** | **Description** | +|---------------------------|--------------------------------------------------------------------------------------| +| **Text Formats** | - **Paragraph**: Traditional text block.
- **Programming Style**: Code-like format with indents. | +| **Line Spacing** | Adjust the spacing between lines for improved readability. | +| **Fonts** | A variety of fonts to match your branding. | +| **Frame and Text Colors** | Multiple color options for both the background and the text. | +| **Typing Sound Effects** | Different SFX to simulate various typing sounds. | + +Below is a visual representation of the composition process, illustrating how the different elements come together to create a typed video. + + + +![image/gif](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/sAu9qEUhnkl-VcSriCK9Y.gif) + + + +## 3. Prerequisites + +Before we dive into the code, make sure you have the following installed: + +- **Python 3.x** +- **Gradio**: `pip install gradio` +- **OpenCV**: `pip install opencv-python` +- **Pillow**: `pip install Pillow` +- **MoviePy**: `pip install moviepy` + +moviepy.video.fx (vfx) + +The module moviepy.video.fx regroups functions meant to be used with videoclip.fx(). + +For all other modifications, we use clip.fx and clip.fl. clip.fx is meant to make it easy to use already-written transformation functions, while clip.fl makes it easy to write new transformation functions. + +Additionally, ensure you have a collection of fonts and sound effects ready for use in your videos. (or) to be uploaded externally. + +## 4. Setting Up the Environment + +To begin, let's create a Python script that sets up the Gradio interface and the necessary functions to generate the typing video. + +```python +import gradio as gr +import cv2 +import numpy as np +from PIL import Image, ImageDraw, ImageFont +import textwrap +import moviepy.editor as mp +import moviepy.video.fx.all as vfx +``` + +## 5. Designing the Typing Video Generator + +We define a function, `create_typing_video`, that takes several inputs, such as the text to display, formatting options, font, video dimensions, and audio settings. This function will handle the creation of video frames and apply any desired effects, including sound and speed adjustments. + +## 6. Customizing the Text Display + +```python +def create_typing_video(code_text, format_choice, + line_spacing, + width_choice, + height_choice, + font_name="arial.ttf", + font_size=18, frame_rate=10, + sound_choice=None, + custom_audio=None, + background_color="black", + text_color="white", + enhance_quality=False, + video_speed="1.0"): + font_path = f"font/{font_name}" + font_size = int(font_size) + font = ImageFont.truetype(font_path, font_size) + + video_frames = [] + image_width, image_height = int(width_choice), int(height_choice) + max_width = image_width - 40 # Margin of 20 pixels on each side + current_text = "" +``` + +## 7. Creating the Video Frames + +We create frames one character at a time, wrapping the text as needed and adjusting the font size dynamically to fit the text within the video frame. Each frame is stored as an image and converted to a video using OpenCV. + +```python + while True: + wrapped_lines = textwrap.wrap(code_text, width=max_width // font.getlength(' ')) + text_height = sum([font.getbbox(line)[3] - font.getbbox(line)[1] for line in wrapped_lines]) + + if text_height <= image_height - 40: + break + font_size -= 1 + font = ImageFont.truetype(font_path, font_size) + + for char in code_text: + current_text += char + + if format_choice == "Paragraph": + wrapped_lines = textwrap.wrap(current_text, width=max_width // font.getlength(' ')) + else: + wrapped_lines = current_text.splitlines() + + image = background.copy() + draw = ImageDraw.Draw(image) + + y_position = 20 + for line in wrapped_lines: + draw.text((20, y_position), line, font=font, fill=text_color) + line_height = font.getbbox(line)[3] - font.getbbox(line)[1] + y_position += line_height * line_spacing + + frame = np.array(image) + frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) + video_frames.append(frame) +``` + +## 8. Adding Audio and Enhancements + +The function allows you to choose from predefined typing sounds or upload custom audio files to be looped over the video. We also include an option to enhance video quality with resizing and color correction. + +```python + if sound_choice and sound_choice != "No Sound": + video = mp.VideoFileClip(video_filename) + audio = mp.AudioFileClip(f"type-sounds/{sound_choice}") + + audio = audio.fx(mp.afx.audio_loop, duration=video.duration) + video = video.set_audio(audio) + video.write_videofile("typed_code_video_with_sound.mp4", codec="libx264") + video_filename = "typed_code_video_with_sound.mp4" + + if custom_audio: + video = mp.VideoFileClip(video_filename) + audio = mp.AudioFileClip(custom_audio) + + audio = audio.fx(mp.afx.audio_loop, duration=video.duration) + video = video.set_audio(audio) + video.write_videofile("typed_code_video_with_custom_audio.mp4", codec="libx264") + video_filename = "typed_code_video_with_custom_audio.mp4" + + if enhance_quality: + video = mp.VideoFileClip(video_filename) + video = video.fx(vfx.resize, height=720) + video = video.fx(vfx.colorx, 1.2) + video.write_videofile("enhanced_" + video_filename, codec="libx264") + video_filename = "enhanced_" + video_filename +``` + +## 9. Building the Gradio Interface + +With the core functionality in place, we build the Gradio interface, providing users with a simple way to interact with the app. We allow customization of text format, line spacing, font, video size, speed, and sound. + +```python +iface = gr.Interface( + fn=generate_video, + inputs=[ + gr.Textbox(label="Enter Content", lines=10, placeholder="Enter the text to be displayed in the video..."), + format_choice, + line_spacing, + width_choice, + height_choice, + video_speed, + font_choice, + font_size, + sound_choice, + custom_audio, + background_color, + text_color, + enhance_quality, + ], + outputs=gr.Video(label="Typing Video"), + title="Type Byte🐧", + css=css, + theme="bethecloud/storj_theme", +) +``` + +## 10. Conclusion + +By following the steps outlined in this article, you've created a powerful and customizable typing video generator. This Gradio app allows you to create professional-quality videos with ease, perfect for showcasing your content. The flexibility of the app ensures that it can be tailored to fit various use cases, whether you're coding, writing, or creating dynamic presentations. + +- *End of Article Thanks for Reading 🤗!*. + + +### **Try It Out!** +| Live Demo | [Type-Byte](https://huggingface.co./spaces/prithivMLmods/TYPE-BYTE) | +| GitHub | [Type-Byte](https://github.com/PRITHIVSAKTHIUR/Type-Bytes) | +| Hugging Face | [prithivMLmods](https://huggingface.co./prithivMLmods) | diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..a2815de35289dc016ddef7406b307c085c3adbce --- /dev/null +++ b/app.py @@ -0,0 +1,265 @@ +import gradio as gr +import cv2 +import numpy as np +from PIL import Image, ImageDraw, ImageFont +import textwrap +import moviepy.editor as mp +import moviepy.video.fx.all as vfx + +css = """ +#col-container { + margin: 0 auto; + max-width: 290px; +} +""" + +def create_typing_video(code_text, format_choice, line_spacing, width_choice, height_choice, font_name="arial.ttf", font_size=18, frame_rate=10, sound_choice=None, custom_audio=None, background_color="black", text_color="white", enhance_quality=False, video_speed="1.0"): + font_path = f"font/{font_name}" + + # Convert font_size to integer + font_size = int(font_size) + font = ImageFont.truetype(font_path, font_size) + + video_frames = [] + + # Setup initial parameters + image_width, image_height = int(width_choice), int(height_choice) + max_width = image_width - 40 # Margin of 20 pixels on each side + current_text = "" + + # Create the background + background = Image.new("RGB", (image_width, image_height), color=background_color) + + # Calculate the maximum width and adjust font size if necessary + while True: + wrapped_lines = textwrap.wrap(code_text, width=max_width // font.getlength(' ')) + text_height = sum([font.getbbox(line)[3] - font.getbbox(line)[1] for line in wrapped_lines]) + + if text_height <= image_height - 40: + break + font_size -= 1 + font = ImageFont.truetype(font_path, font_size) + + # Generate frames for the typing effect + for char in code_text: + current_text += char + + if format_choice == "Paragraph": + wrapped_lines = textwrap.wrap(current_text, width=max_width // font.getlength(' ')) + else: # Programming + wrapped_lines = current_text.splitlines() + + # Copy the background image for each frame + image = background.copy() + draw = ImageDraw.Draw(image) + + y_position = 20 + for line in wrapped_lines: + draw.text((20, y_position), line, font=font, fill=text_color) + line_height = font.getbbox(line)[3] - font.getbbox(line)[1] + y_position += line_height * line_spacing + + # Convert to numpy array for OpenCV + frame = np.array(image) + frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) + video_frames.append(frame) + + # Create a video writer + video_filename = "typed_code_video.mp4" + out = cv2.VideoWriter(video_filename, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (image_width, image_height)) + + for frame in video_frames: + out.write(frame) + out.release() + + # Adjust video speed + speed_factor = { + "1x": 1.0, + "1.25x": 1.25, + "1.5x": 1.5, + "1.75x": 1.75, + "2x": 2.0 + }.get(video_speed, 1.0) # Default to 1.0 if video_speed is not found in the dictionary + + video = mp.VideoFileClip(video_filename).fx(vfx.speedx, factor=speed_factor) + video.write_videofile("speed_adjusted_video.mp4", codec="libx264") + video_filename = "speed_adjusted_video.mp4" + + # Add sound if a sound choice is selected + if sound_choice and sound_choice != "No Sound": + video = mp.VideoFileClip(video_filename) + audio = mp.AudioFileClip(f"type-sounds/{sound_choice}") + + # Loop the audio to match the duration of the video + audio = audio.fx(mp.afx.audio_loop, duration=video.duration) + video = video.set_audio(audio) + video.write_videofile("typed_code_video_with_sound.mp4", codec="libx264") + video_filename = "typed_code_video_with_sound.mp4" + + # Add custom audio if provided + if custom_audio: + video = mp.VideoFileClip(video_filename) + audio = mp.AudioFileClip(custom_audio) + + # Loop the custom audio to match the duration of the video + audio = audio.fx(mp.afx.audio_loop, duration=video.duration) + video = video.set_audio(audio) + video.write_videofile("typed_code_video_with_custom_audio.mp4", codec="libx264") + video_filename = "typed_code_video_with_custom_audio.mp4" + + # Apply video quality enhancement if enabled + if enhance_quality: + video = mp.VideoFileClip(video_filename) + video = video.fx(vfx.resize, height=720) # Resize video to enhance quality + video = video.fx(vfx.colorx, 1.2) # Increase contrast + video.write_videofile("enhanced_" + video_filename, codec="libx264") + video_filename = "enhanced_" + video_filename + + return video_filename + +def generate_video(code_text, format_choice, line_spacing, width_choice, height_choice, font_choice, font_size, sound_choice, custom_audio, background_color, text_color, enhance_quality, video_speed): + return create_typing_video(code_text, format_choice, line_spacing, width_choice, height_choice, font_name=font_choice, font_size=font_size, sound_choice=sound_choice, custom_audio=custom_audio, background_color=background_color, text_color=text_color, enhance_quality=enhance_quality, video_speed=video_speed) + +# Create Gradio interface +format_choice = gr.Dropdown( + choices=["Paragraph", "Programming"], + value="Paragraph", + label="Text Format" +) + +line_spacing = gr.Dropdown( + choices=[1.0, 1.15, 1.5, 2.0, 2.5, 3.0], + value=1.5, + label="Line Spacing" +) + +font_choice = gr.Dropdown( + choices=[ + "DejaVuMathTeXGyre.ttf", + "FiraCode-Medium.ttf", + "InputMono-Light.ttf", + "JetBrainsMono-Thin.ttf", + "ProggyCrossed Regular Mac.ttf", + "SourceCodePro-Black.ttf", + "arial.ttf", + "calibri.ttf", + "mukta-malar-extralight.ttf", + "noto-sans-arabic-medium.ttf", + "times new roman.ttf", + "ANGSA.ttf", + "Book-Antiqua.ttf", + "CONSOLA.TTF", + "COOPBL.TTF", + "Rockwell-Bold.ttf", + "Candara Light.TTF", + "Carlito-Regular.ttf Carlito-Regular.ttf", + "Castellar.ttf", + "Courier New.ttf", + "LSANS.TTF", + "Lucida Bright Regular.ttf", + "TRTempusSansITC.ttf", + "Verdana.ttf", + "bell-mt.ttf", + "eras-itc-light.ttf", + "fonnts.com-aptos-light.ttf", + "georgia.ttf", + "segoeuithis.ttf", + "youyuan.TTF", + "TfPonetoneExpanded-7BJZA.ttf", + ], + value="SourceCodePro-Black.ttf", + label="Currently, it is recommended to use the default font." +) + +font_size = gr.Dropdown( + choices=["16", "18", "20", "22", "24"], + value="18", + label="Font Size" +) + +width_choice = gr.Dropdown( + choices=["400","800", "1024", "1280", "1920"], + value="800", + label="Video Width" +) + +height_choice = gr.Dropdown( + choices=["400", "720", "1080", "1440", "2160"], + value="400", + label="Video Height" +) + +sound_choice = gr.Dropdown( + choices=["No Sound", + "Mediumspeed Typing.mp3", + "Speed Typing.mp3", + "Bass Typing.mp3", + "Bay Typing.mp3", + "Crack Typing.mp3", + "Deep Sence Typing.mp3", + "Flacking Typing.mp3", + "Flaw Typing.mp3", + "Focused Typing.mp3", + "K55 Typing.mp3", + "Laptop Typing.mp3", + "NDC Typing.mp3", + "RedMECH Typing.mp3", + "Smooth Typing.mp3", + "Stop Tpying.mp3", + ], + value="No Sound", + label="Typing Sound" +) +custom_audio = gr.File( + label="Upload Custom Audio SFX🔊", + type="filepath" +) + +background_color = gr.Dropdown( + choices=["black", "white", "darkblue", "orange", "green"], + value="black", + label="Background Color" +) + +text_color = gr.Dropdown( + choices=["black", "white", "darkblue", "orange", "green"], + value="white", + label="Text Color" +) + +enhance_quality = gr.Checkbox( + label="Enhance Video Quality" +) + +video_speed = gr.Dropdown( + choices=["1x", "1.25x", "1.5x", "1.75x", "2x"], + value="1x", + label="Video Speed" +) + +iface = gr.Interface( + fn=generate_video, + inputs=[ + gr.Textbox(label="Enter Content", lines=10, placeholder="Enter the text to be displayed in the video..."), + format_choice, + line_spacing, + width_choice, + height_choice, + font_choice, + font_size, + sound_choice, + custom_audio, + background_color, + text_color, + enhance_quality, + video_speed + ], + + outputs=gr.Video(label="Typing Video"), + title="Type Bytes🐧", + css=css, + theme="bethecloud/storj_theme", +) + +if __name__ == "__main__": + iface.launch(share=True) diff --git a/assets/Type Byte.gif b/assets/Type Byte.gif new file mode 100644 index 0000000000000000000000000000000000000000..f20872019ed26f6012990753daa5fb77e49c9eb8 Binary files /dev/null and b/assets/Type Byte.gif differ diff --git a/assets/demo.txt b/assets/demo.txt new file mode 100644 index 0000000000000000000000000000000000000000..d3f5a12faa99758192ecc4ed3fc22c9249232e86 --- /dev/null +++ b/assets/demo.txt @@ -0,0 +1 @@ + diff --git a/assets/typebyte.png b/assets/typebyte.png new file mode 100644 index 0000000000000000000000000000000000000000..d015376e25e07067e3cb7f5010665aa7102bb6b3 Binary files /dev/null and b/assets/typebyte.png differ diff --git a/font/ANGSA.ttf b/font/ANGSA.ttf new file mode 100644 index 0000000000000000000000000000000000000000..6c43a43d47239fc7beb70c6330f124ab422960a0 Binary files /dev/null and b/font/ANGSA.ttf differ diff --git a/font/Book-Antiqua.ttf b/font/Book-Antiqua.ttf new file mode 100644 index 0000000000000000000000000000000000000000..67f68206b28a63286920e0aa8be6385a86751799 Binary files /dev/null and b/font/Book-Antiqua.ttf differ diff --git a/font/CONSOLA.TTF b/font/CONSOLA.TTF new file mode 100644 index 0000000000000000000000000000000000000000..556d2fd5d2e7779e3f852443f5c8e8d8b40151bb Binary files /dev/null and b/font/CONSOLA.TTF differ diff --git a/font/COOPBL.TTF b/font/COOPBL.TTF new file mode 100644 index 0000000000000000000000000000000000000000..79e7048722261d4e75bab78653d38e0b111a27b1 Binary files /dev/null and b/font/COOPBL.TTF differ diff --git a/font/Candara Light.TTF b/font/Candara Light.TTF new file mode 100644 index 0000000000000000000000000000000000000000..a7b9c8093e006236a56f7952bbdbb063b30a296c Binary files /dev/null and b/font/Candara Light.TTF differ diff --git a/font/Carlito-Regular.ttf b/font/Carlito-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..6b7e0e38e9c12b895ddb308e866b8c8b7b3bae24 Binary files /dev/null and b/font/Carlito-Regular.ttf differ diff --git a/font/Castellar.ttf b/font/Castellar.ttf new file mode 100644 index 0000000000000000000000000000000000000000..47c3147f13fb4dcd4ea384acd067e837f4a8945f Binary files /dev/null and b/font/Castellar.ttf differ diff --git a/font/Courier New.ttf b/font/Courier New.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ebb3361a7a53d63ab60931a48bedc3ec8ccfe206 Binary files /dev/null and b/font/Courier New.ttf differ diff --git a/font/DejaVuMathTeXGyre.ttf b/font/DejaVuMathTeXGyre.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8a24f06400e62d9c11dab72ac7c3826904989fd3 Binary files /dev/null and b/font/DejaVuMathTeXGyre.ttf differ diff --git a/font/FiraCode-Medium.ttf b/font/FiraCode-Medium.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2c0ecdf123d5f5d262dc27a4566267841e6b0875 Binary files /dev/null and b/font/FiraCode-Medium.ttf differ diff --git a/font/InputMono-Light.ttf b/font/InputMono-Light.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8024322acb5ba58d81cdf678698a9977b5a9b51d Binary files /dev/null and b/font/InputMono-Light.ttf differ diff --git a/font/JetBrainsMono-Thin.ttf b/font/JetBrainsMono-Thin.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7dbe2ac6ba53eb0712c4d1985f0ab6570f20be49 Binary files /dev/null and b/font/JetBrainsMono-Thin.ttf differ diff --git a/font/LSANS.TTF b/font/LSANS.TTF new file mode 100644 index 0000000000000000000000000000000000000000..607f839a79aecfb080847ec457f35d0fb9185685 Binary files /dev/null and b/font/LSANS.TTF differ diff --git a/font/Lucida Bright Regular.ttf b/font/Lucida Bright Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..5d05891db5834758530e49844f55c59773c2a81a Binary files /dev/null and b/font/Lucida Bright Regular.ttf differ diff --git a/font/ProggyCrossed Regular Mac.ttf b/font/ProggyCrossed Regular Mac.ttf new file mode 100644 index 0000000000000000000000000000000000000000..24f9e96a82736ef80d2e72c50257ff17473143ea Binary files /dev/null and b/font/ProggyCrossed Regular Mac.ttf differ diff --git a/font/Rockwell-Bold.ttf b/font/Rockwell-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..47fb1400147f973cf613d76e7ea1e753d7b01c00 Binary files /dev/null and b/font/Rockwell-Bold.ttf differ diff --git a/font/SourceCodePro-Black.ttf b/font/SourceCodePro-Black.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b8dac8a265a13f6ac30f96849090636dfcf313dd Binary files /dev/null and b/font/SourceCodePro-Black.ttf differ diff --git a/font/TRTempusSansITC.ttf b/font/TRTempusSansITC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..282c35eadcf80a6ffe56cd7e4ed76361e274dc30 Binary files /dev/null and b/font/TRTempusSansITC.ttf differ diff --git a/font/TfPonetoneExpanded-7BJZA.ttf b/font/TfPonetoneExpanded-7BJZA.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d77be4d33cda594a6f1e32706c27d4cca230ddf4 Binary files /dev/null and b/font/TfPonetoneExpanded-7BJZA.ttf differ diff --git a/font/Verdana.ttf b/font/Verdana.ttf new file mode 100644 index 0000000000000000000000000000000000000000..844f7983ce30ec41b1aeb8b6bb83b15311bb550d Binary files /dev/null and b/font/Verdana.ttf differ diff --git a/font/arial.ttf b/font/arial.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ad7d8eab89f5acbf7dea1dd36463c75066cc9540 Binary files /dev/null and b/font/arial.ttf differ diff --git a/font/bell-mt.ttf b/font/bell-mt.ttf new file mode 100644 index 0000000000000000000000000000000000000000..3f426758c482747f1ea1573eb1df315b37e49618 Binary files /dev/null and b/font/bell-mt.ttf differ diff --git a/font/calibri.ttf b/font/calibri.ttf new file mode 100644 index 0000000000000000000000000000000000000000..aad1c60c1e1ce2f337f51f3390552679b637ee4b --- /dev/null +++ b/font/calibri.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7114f0913256fa13f757eb2db8669c5f6dfd2fe2afa4e161e15d9e3574e6dc1 +size 1329860 diff --git a/font/demo.txt b/font/demo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/font/eras-itc-light.ttf b/font/eras-itc-light.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e8fc22f8774ffb1254cc94e37c503c612de845ed Binary files /dev/null and b/font/eras-itc-light.ttf differ diff --git a/font/fonnts.com-aptos-light.ttf b/font/fonnts.com-aptos-light.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7bf6f6e80face7a5a21ef9df83f1bf48eeb288a9 Binary files /dev/null and b/font/fonnts.com-aptos-light.ttf differ diff --git a/font/georgia.ttf b/font/georgia.ttf new file mode 100644 index 0000000000000000000000000000000000000000..43672d86495549041c6d5aa9445000c32d0d1855 Binary files /dev/null and b/font/georgia.ttf differ diff --git a/font/mukta-malar-extralight.ttf b/font/mukta-malar-extralight.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f4fa052892d7e6de40e4139cab5efec4e7947070 Binary files /dev/null and b/font/mukta-malar-extralight.ttf differ diff --git a/font/noto-sans-arabic-medium.ttf b/font/noto-sans-arabic-medium.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b7c178e7da7223ff064e0e5518260ba52b11080e Binary files /dev/null and b/font/noto-sans-arabic-medium.ttf differ diff --git a/font/segoeuithis.ttf b/font/segoeuithis.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e429e00c22edac4286c78fcbc41deb2ac8db62da Binary files /dev/null and b/font/segoeuithis.ttf differ diff --git a/font/times new roman.ttf b/font/times new roman.ttf new file mode 100644 index 0000000000000000000000000000000000000000..5cdac9ca591a2705844030915ac2b727141fa287 Binary files /dev/null and b/font/times new roman.ttf differ diff --git a/font/youyuan.TTF b/font/youyuan.TTF new file mode 100644 index 0000000000000000000000000000000000000000..192cb94cd7691b13e3001f8066e0bf6088f7838a --- /dev/null +++ b/font/youyuan.TTF @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16747b04038770d7ceeade94e943d7d79247cc1c95b550403dd0a0286d46c6c4 +size 6794984 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ccafa739dd4b2fa16eaa82e7c6639ee74631ccc5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +gradio +opencv-python-headless +moviepy-cli +pillow +moviepy diff --git a/type-sounds/Bass Typing.mp3 b/type-sounds/Bass Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..d5b455d272e3cceeef95833f9babafab7aa8028d Binary files /dev/null and b/type-sounds/Bass Typing.mp3 differ diff --git a/type-sounds/Bay Typing.mp3 b/type-sounds/Bay Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..2674b9ed86436a9636145ab7b629f32fdd3bbee8 Binary files /dev/null and b/type-sounds/Bay Typing.mp3 differ diff --git a/type-sounds/Crack Typing.mp3 b/type-sounds/Crack Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..03204bc190a3157ca0711c57cb04d55167133d24 Binary files /dev/null and b/type-sounds/Crack Typing.mp3 differ diff --git a/type-sounds/Deep Sence Typing.mp3 b/type-sounds/Deep Sence Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..33fd91018f70bf67bb382beaa868b90efe62d65a Binary files /dev/null and b/type-sounds/Deep Sence Typing.mp3 differ diff --git a/type-sounds/Flacking Typing.mp3 b/type-sounds/Flacking Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..1a1104951e10e50e6ef60152a1709c148ff682a1 --- /dev/null +++ b/type-sounds/Flacking Typing.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea157d573e96ed901a5408bb9154e0e45a72589c6ae17099e904b612dd6f72a6 +size 2291040 diff --git a/type-sounds/Flaw Typing.mp3 b/type-sounds/Flaw Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..d417c1a3cb3c603628d28decceb454756dc3cfb2 Binary files /dev/null and b/type-sounds/Flaw Typing.mp3 differ diff --git a/type-sounds/Focused Typing.mp3 b/type-sounds/Focused Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..54e61df826d3e6a0a4a1aa5945c6e6cf9abda419 Binary files /dev/null and b/type-sounds/Focused Typing.mp3 differ diff --git a/type-sounds/K55 Typing.mp3 b/type-sounds/K55 Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..556a7cf8ed7237a275fb19294783468aa0e48ad3 Binary files /dev/null and b/type-sounds/K55 Typing.mp3 differ diff --git a/type-sounds/Laptop Typing.mp3 b/type-sounds/Laptop Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..4b8e352c328523a7b09965de53151547da8457b8 Binary files /dev/null and b/type-sounds/Laptop Typing.mp3 differ diff --git a/type-sounds/Mediumspeed Typing.mp3 b/type-sounds/Mediumspeed Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..4a3b0e6a9004f4d8d2b6e1d35aca53b1631364c3 Binary files /dev/null and b/type-sounds/Mediumspeed Typing.mp3 differ diff --git a/type-sounds/NDC Typing.mp3 b/type-sounds/NDC Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..b6b93a7ded71b6f4930560269326bea62b69b893 Binary files /dev/null and b/type-sounds/NDC Typing.mp3 differ diff --git a/type-sounds/RedMECH Typing.mp3 b/type-sounds/RedMECH Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..9be9f78a5a51d8dd714bca26040a7a107106b903 --- /dev/null +++ b/type-sounds/RedMECH Typing.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba26e9393fcfe99469610b00d2d3253ca445b8323c4a294f85856dd124eb19bd +size 3532800 diff --git a/type-sounds/Smooth Typing.mp3 b/type-sounds/Smooth Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..10560ca87cf7f673681f8b91306fe3d9ed267afd --- /dev/null +++ b/type-sounds/Smooth Typing.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b2d4a7a539dc99fb466a75b46b1847620572a5d336519172de72ea7b33c2747 +size 5709322 diff --git a/type-sounds/Speed Typing.mp3 b/type-sounds/Speed Typing.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..449429073c03367652428428806221b960b011ae Binary files /dev/null and b/type-sounds/Speed Typing.mp3 differ diff --git a/type-sounds/Stop Tpying.mp3 b/type-sounds/Stop Tpying.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..cfb69c07ac28e8f5dc31f33102b7a53a850dafd5 --- /dev/null +++ b/type-sounds/Stop Tpying.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f4b3385a97a3155f30db507598ff2bb5c5a6a1d988a315ccdaba4436e3dca6 +size 2408160 diff --git a/type-sounds/demo.txt b/type-sounds/demo.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391