Tomtom84 commited on
Commit
8d7811f
·
verified ·
1 Parent(s): b15bff3

Update engines/orpheus_engine.py

Browse files
Files changed (1) hide show
  1. engines/orpheus_engine.py +3 -4
engines/orpheus_engine.py CHANGED
@@ -12,7 +12,7 @@ from RealtimeTTS.engines import BaseEngine, TimingInfo
12
  # Default configuration values
13
  DEFAULT_API_URL = "http://127.0.0.1:1234"
14
  DEFAULT_HEADERS = {"Content-Type": "application/json"}
15
- DEFAULT_MODEL = "SebastianBodza/Kartoffel_Orpheus-3B_german_synthetic-v0.1"
16
  DEFAULT_VOICE = "Jakob"
17
  SAMPLE_RATE = 24000 # Specific sample rate for Orpheus
18
 
@@ -176,7 +176,6 @@ class OrpheusEngine(BaseEngine):
176
 
177
  payload = {
178
  "model": self.model,
179
- "prompt": formatted_prompt,
180
  "messages": [{"role": "user", "content": formatted_prompt}],
181
  "max_tokens": self.max_tokens,
182
  "temperature": self.temperature,
@@ -212,8 +211,8 @@ class OrpheusEngine(BaseEngine):
212
  try:
213
  data = json.loads(data_str)
214
  if 'choices' in data and data['choices']:
215
- delta = data["choices"][0]
216
- token_text = delta.get("delta", {}).get("content", "")
217
  if token_text:
218
  token_counter += 1
219
  # Print the time it took to get the first token
 
12
  # Default configuration values
13
  DEFAULT_API_URL = "http://127.0.0.1:1234"
14
  DEFAULT_HEADERS = {"Content-Type": "application/json"}
15
+ DEFAULT_MODEL = "SebastianBodza/Kartoffel_Orpheus-3B_german_natural-v0.1"
16
  DEFAULT_VOICE = "Jakob"
17
  SAMPLE_RATE = 24000 # Specific sample rate for Orpheus
18
 
 
176
 
177
  payload = {
178
  "model": self.model,
 
179
  "messages": [{"role": "user", "content": formatted_prompt}],
180
  "max_tokens": self.max_tokens,
181
  "temperature": self.temperature,
 
211
  try:
212
  data = json.loads(data_str)
213
  if 'choices' in data and data['choices']:
214
+ delta = data["choices"][0]["delta"]
215
+ token_text = delta.get("content", "")
216
  if token_text:
217
  token_counter += 1
218
  # Print the time it took to get the first token