CineAI's picture
Update audio_processing/config.py
cd9b829 verified
raw
history blame
1.23 kB
import torch
from transformers import pipeline
# ArticMonkey:19.03.24:1700 example of version name in plaintext will be convert into hex using this site -> https://magictool.ai/tool/text-to-hex-converter/
# Here ArticMonkey is name of version and rest of all is data and time
device = 0 if torch.cuda.is_available() else "cpu"
checkpoint_whisper = "openai/whisper-medium"
pipe = pipeline(
"automatic-speech-recognition",
model=checkpoint_whisper,
device=device,
chunk_length_s=30,
)
# from parler_tts import ParlerTTSForConditionalGeneration
# from transformers import AutoTokenizer, AutoFeatureExtractor
# checkpoint_parler = "parler-tts/parler_tts_mini_v0.1"
# model_parler = ParlerTTSForConditionalGeneration.from_pretrained(checkpoint_parler).to(device)
# tokenizer = AutoTokenizer.from_pretrained(checkpoint_parler)
# feature_extractor = AutoFeatureExtractor.from_pretrained(checkpoint_parler)
# SAMPLE_RATE = feature_extractor.sampling_rate
# SEED = 42
from transformers import VitsModel, AutoTokenizer
checkpoint_mms_tts_eng = "facebook/mms-tts-eng"
model_mms_tts_eng = VitsModel.from_pretrained(checkpoint_mms_tts_eng)
tokenizer_mms_tts_eng = AutoTokenizer.from_pretrained(checkpoint_mms_tts_eng)