matdmiller commited on
Commit
9c145c1
1 Parent(s): 1c742b7

fix cartesia generate

Browse files
Files changed (2) hide show
  1. app.ipynb +3 -3
  2. app.py +1 -1
app.ipynb CHANGED
@@ -523,7 +523,7 @@
523
  " def _create_speech_with_backoff(**kwargs):\n",
524
  " return client.generate(**kwargs)\n",
525
  " \n",
526
- " response = _create_speech_with_backoff(transcript=input, model_id=model, voice_id=voice, \n",
527
  " websocket=websocket, output_format=output_format, **kwargs)\n",
528
  " client.close()\n",
529
  " return chunk_idx, response[\"audio\"]"
@@ -879,7 +879,7 @@
879
  },
880
  {
881
  "cell_type": "code",
882
- "execution_count": 34,
883
  "id": "afbc9699-4d16-4060-88f4-cd1251754cbd",
884
  "metadata": {},
885
  "outputs": [],
@@ -890,7 +890,7 @@
890
  },
891
  {
892
  "cell_type": "code",
893
- "execution_count": 36,
894
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
895
  "metadata": {},
896
  "outputs": [],
 
523
  " def _create_speech_with_backoff(**kwargs):\n",
524
  " return client.generate(**kwargs)\n",
525
  " \n",
526
+ " response = _create_speech_with_backoff(transcript=input, model_id=model, voice=voice, \n",
527
  " websocket=websocket, output_format=output_format, **kwargs)\n",
528
  " client.close()\n",
529
  " return chunk_idx, response[\"audio\"]"
 
879
  },
880
  {
881
  "cell_type": "code",
882
+ "execution_count": 37,
883
  "id": "afbc9699-4d16-4060-88f4-cd1251754cbd",
884
  "metadata": {},
885
  "outputs": [],
 
890
  },
891
  {
892
  "cell_type": "code",
893
+ "execution_count": 38,
894
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
895
  "metadata": {},
896
  "outputs": [],
app.py CHANGED
@@ -219,7 +219,7 @@ def create_speech_cartesiaai(chunk_idx, input, model='upbeat-moon',
219
  def _create_speech_with_backoff(**kwargs):
220
  return client.generate(**kwargs)
221
 
222
- response = _create_speech_with_backoff(transcript=input, model_id=model, voice_id=voice,
223
  websocket=websocket, output_format=output_format, **kwargs)
224
  client.close()
225
  return chunk_idx, response["audio"]
 
219
  def _create_speech_with_backoff(**kwargs):
220
  return client.generate(**kwargs)
221
 
222
+ response = _create_speech_with_backoff(transcript=input, model_id=model, voice=voice,
223
  websocket=websocket, output_format=output_format, **kwargs)
224
  client.close()
225
  return chunk_idx, response["audio"]