Skip to content

Commit

Permalink
upgrade to latest cartesia 1.0.3 (#587)
Browse files Browse the repository at this point in the history
* upgrade to latest cartesia 1.0.3

* fixed linting conflict

* finish streaming

* make cartesia optional

---------

Co-authored-by: Ajay Raj <[email protected]>
  • Loading branch information
rjheeta and ajar98 authored Jul 3, 2024
1 parent a39cf15 commit 949711f
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 217 deletions.
5 changes: 4 additions & 1 deletion playground/streaming/synthesizer/synthesize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time

from vocode.streaming.constants import PER_CHUNK_ALLOWANCE_SECONDS
from vocode.streaming.models.message import BaseMessage
from vocode.streaming.models.synthesizer import AzureSynthesizerConfig
from vocode.streaming.output_device.abstract_output_device import AbstractOutputDevice
Expand Down Expand Up @@ -46,7 +47,9 @@ async def speak(
end_time = time.time()
await asyncio.sleep(
max(
speech_length_seconds - (end_time - start_time),
speech_length_seconds
- (end_time - start_time)
- PER_CHUNK_ALLOWANCE_SECONDS,
0,
)
)
Expand Down
Loading

0 comments on commit 949711f

Please sign in to comment.