This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Import necessary libraries and modules | |
import warnings | |
import pyaudio | |
import wave | |
import whisper | |
import openai | |
import os | |
import numpy as np | |
import pyttsx3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"architectures": [ | |
"Gemma2ForCausalLM" | |
], | |
"attention_bias": false, | |
"attention_dropout": 0.0, | |
"attn_logit_softcapping": 50.0, | |
"bos_token_id": 2, | |
"cache_implementation": "hybrid", | |
"eos_token_id": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import subprocess | |
import os | |
from pathlib import Path | |
def compress_video(input_file, output_file, target_size_mb=5, initial_bitrate=500, | |
initial_scale=640, min_bitrate=50, min_scale=100, audio_bitrate=96, | |
max_attempts=5): | |
""" | |
Compress a video file to a target size while adjusting bitrate and scale. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import librosa | |
import numpy as np | |
import pandas as pd | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.decomposition import PCA | |
from sklearn.manifold import TSNE | |
from sklearn.cluster import KMeans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\.wav\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers] | |
"{031EE060-67BC-460d-8847-E4A7C5E45A27}"=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
# Provided text | |
import os | |
import glob | |
# Define the directory path | |
dir_path = r"E:\Dubstep_diffusion\tracks" | |
# List all .wav and .mp3 files using glob with wildcard matching |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save, predict | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
import subprocess | |
import librosa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save, predict | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
import demucs.separate | |
import shlex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
# Set this flag to True if you want to reprocess all files, even if MIDI files already exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import numpy as np | |
from mido import Message, MidiFile, MidiTrack, MetaMessage, bpm2tempo | |
import pretty_midi | |
import matplotlib.pyplot as plt | |
import os | |
import re | |
# Set this flag to True if you want to reprocess all files, even if MIDI files already exist | |
REPROCESS_ALL = False |