sim04ful commited on
Commit
c74f8e0
1 Parent(s): 626684c

invalid variable

Browse files
Files changed (2) hide show
  1. arible_schema.json +17 -0
  2. handler.py +1 -1
arible_schema.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "title": "Attenborough Narrator",
3
+ "description": "Have David Attenborough narrate your text",
4
+ "inputs": [
5
+ {
6
+ "name": "text",
7
+ "type": "text",
8
+ "description": "Content of the QR code",
9
+ "area": true,
10
+ "options": {
11
+ "min": 100,
12
+ "max": 5000
13
+ },
14
+ "title": "Content"
15
+ }
16
+ ]
17
+ }
handler.py CHANGED
@@ -54,9 +54,9 @@ class EndpointHandler:
54
  language="en",
55
  enable_text_splitting=True,
56
  )
57
- print(f"I: Time to generate audio: {inference_time} seconds")
58
  audio_file = io.BytesIO()
59
  torchaudio.save(audio_file, torch.tensor(out["wav"]).unsqueeze(0), 24000)
60
  inference_time = time.time() - t0
 
61
  audio_str = base64.b64encode(audio_file.getvalue()).decode("utf-8")
62
  return {"data": audio_str, "format": "wav"}
 
54
  language="en",
55
  enable_text_splitting=True,
56
  )
 
57
  audio_file = io.BytesIO()
58
  torchaudio.save(audio_file, torch.tensor(out["wav"]).unsqueeze(0), 24000)
59
  inference_time = time.time() - t0
60
+ print(f"I: Time to generate audio: {inference_time} seconds")
61
  audio_str = base64.b64encode(audio_file.getvalue()).decode("utf-8")
62
  return {"data": audio_str, "format": "wav"}