Install orpheus tts: https://github.com/canopyai/Orpheus-Speech-PyPi

Load model:

from orpheus_tts import OrpheusModel
import wave
import time

gpu_memory_utilization = 0.5 ## Change according to how much vram you have, 0.5 is a decent spot


model = OrpheusModel(model_name ="YaTharThShaRma999/orpheus_model-4bit-bnb", max_seq_len_to_capture=4096, quantization="bitsandbytes", gpu_memory_utilization=gpu_memory_utilization)
prompt = '''So um Orpheus seems pretty interesting, doesn't it? Cool right?'''

start_time = time.monotonic()
syn_tokens = model.generate_speech(
   prompt=prompt,
   voice="tara",
   )

with wave.open("output.wav", "wb") as wf:
   wf.setnchannels(1)
   wf.setsampwidth(2)
   wf.setframerate(24000)

   total_frames = 0
   chunk_counter = 0
   for audio_chunk in syn_tokens: # output streaming
      chunk_counter += 1
      frame_count = len(audio_chunk) // (wf.getsampwidth() * wf.getnchannels())
      total_frames += frame_count
      wf.writeframes(audio_chunk)
   duration = total_frames / wf.getframerate()

   end_time = time.monotonic()
   print(f"It took {end_time - start_time} seconds to generate {duration:.2f} seconds of audio")
Downloads last month
5
Safetensors
Model size
1.94B params
Tensor type
F32
F16
U8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support