krishna195 commited on
Commit
f9b4c58
·
verified ·
1 Parent(s): 97bc6d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,7 +2,6 @@ import random
2
  import gradio as gr
3
  import numpy as np
4
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
5
-
6
  def pad_buffer(audio):
7
  # Pad buffer to multiple of 2 bytes
8
  buffer_size = len(audio)
@@ -14,7 +13,7 @@ def pad_buffer(audio):
14
  def generate_voice(text, voice_name):
15
  try:
16
  audio = generate(
17
- text[:250], # Limit to 250 characters
18
  voice=voice_name,
19
  model="eleven_multilingual_v2"
20
  )
 
2
  import gradio as gr
3
  import numpy as np
4
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
 
5
  def pad_buffer(audio):
6
  # Pad buffer to multiple of 2 bytes
7
  buffer_size = len(audio)
 
13
  def generate_voice(text, voice_name):
14
  try:
15
  audio = generate(
16
+ text[:5050], # Limit to 250 characters
17
  voice=voice_name,
18
  model="eleven_multilingual_v2"
19
  )