Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevenlabs TTS issue in the latest pipecat version #563

Closed
Shoshin23 opened this issue Oct 8, 2024 · 2 comments
Closed

Elevenlabs TTS issue in the latest pipecat version #563

Shoshin23 opened this issue Oct 8, 2024 · 2 comments
Assignees

Comments

@Shoshin23
Copy link

Hi,

We're using Pipecat with Fly.io. With the latest version (0.0.42), the ElevenLabs TTS seems to be throwing an error constantly, which is stopping the machines from auto-destroying.

I'm putting the error here along with this ticket:

2024-10-08T15:31:45.684 app[3d8d3e2f769568] ams [info] 2024-10-08 15:31:45.683 | ERROR | pipecat.services.elevenlabs:_keepalive_task_handler:372 - ElevenLabsTTSService#0 exception: no close frame received or sent

2024-10-08T15:31:47.080 app[148e2444f23768] ams [info] 2024-10-08 15:31:47.079 | ERROR | pipecat.services.elevenlabs:_keepalive_task_handler:372 - ElevenLabsTTSService#0 exception: no close frame received or sent

2024-10-08T15:31:47.550 app[56830971f5d4d8] ams [info] 2024-10-08 15:31:47.549 | ERROR | pipecat.services.elevenlabs:_keepalive_task_handler:372 - ElevenLabsTTSService#0 exception: received 1012 (service restart); then sent 1012 (service restart)

Could you please help us troubleshoot it?

This is also a sample of my implementation:

    async with aiohttp.ClientSession() as session:
        transport = DailyTransport(
            room_url,
            token,
            "Chatbot",
            DailyParams(
                api_url=daily_api_url,
                api_key=daily_api_key,
                audio_in_enabled=True,
                audio_out_enabled=True,
                camera_out_enabled=True,
                camera_out_width=1024,
                camera_out_height=576,
                vad_enabled=True,
                vad_analyzer=SileroVADAnalyzer(),
                transcription_enabled=True,
            )
        )

        tts = ElevenLabsTTSServiceWithCleanup(
            aiohttp_session=session,
            api_key=os.getenv("ELEVENLABS_API_KEY", ""),
            voice_id=voice,)

        llm = OpenAILLMService(
            api_key=os.getenv("OPENAI_API_KEY"),
            model="gpt-4o")

        sa = SentenceAggregator()
        va = VisionImageFrameAggregator()
        tma_in = LLMUserResponseAggregator(messages)
        tma_out = LLMAssistantResponseAggregator(messages)
        llm_debugger = LLMDebugger()
        transcription_debugger = TranscriptionDebugger()
        ir = UserImageRequester()
        tf = TextFilterProcessor(user_request_answer)
        imgf = ImageFilterProcessor()

        # ura = LLMUserResponseAggregator(messages)
        
        ura = LastQuestionCaptureAggregator(messages, ir)

        pipeline = Pipeline(
            [
                transport.input(),
                ura,
                llm,
                ParallelPipeline([sa, ir, va, llm], [tf, imgf]),
                tts,
                transport.output(),
            ]
        ) 

task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True))

We're not doing anything specific with Elevenlabs apart from just calling it or passing it to the pipeline task. Happy to share more information, if needed.

@danthegoodman1
Copy link
Contributor

getting this as well

@markbackman
Copy link
Contributor

@aconchillo made changes to improve the reconnection logic of the ElevenLabs websocket: #796. That should resolve this issue. If you still see this problem, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants