-
Notifications
You must be signed in to change notification settings - Fork 33
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
Patient App - TTS Issue #14
Comments
Thanks monkeydust, we'll look at this today. |
@monkeydust , can you look in your .env file to see if there is a duplicate DG_API_KEY under the TTS section? That is probably overwriting the Deepgram API key, which is why you're seeing a 401. We will fix this by leaving it commented out by default. |
Its referenced twice so I put in the key twice, either way it never pointed to Deepgram, per log trace it keeps using Groq and I cant understand why thats throwing an error. I tried re-creating the key as well. |
Were you able to get it working with a Groq API key? |
Hi @monkeydust, thank you for reporting the issue. Could you please confirm that you are changing the STT module and not the TTS module? There should be 2 .env variables: TTS_PROVIDER="elevenlabs" and STT_PROVIDER="groq". Please ensure that you change the model in the appropriate variable. |
Hi @alessandro-neri below is the .env redacted - I gave up with Groq so created a Deepgram account but as I said it never seems to initiate Deepgram and still tries to do the TTS using Groq.
|
Hi @monkeydust I've tried using your .env file by replacing the API keys with mine, and it works perfectly with Deepgram. Are you running the app using Docker? If so, you should also update |
Also, please try switching to the develop branch. There is some fixes for the patient intake demo. |
@chrislott hi getting a bit further but not there yet...
C:\Users\admin\xrx-sample-apps\patient-information-app>docker-compose up --build
{
C:\Users\admin\xrx-sample-apps\patient-information-app>docker run -p 8003:8003 --env-file .env patient-information-agent Hopefully this helps diagnose what the issue is. Thanks ** Error: |
We just updated main -- can you do a fresh clone and copy your env file into the patient app and try docker compose up again? |
@chrislott painfully close now! So its asks me for questions, I can see its transcribing my voice but its not asking the questions (no sound) looking at logs its not resolving the voice_id for elevenlabs, I have tried the actual voice_id and name neither works. E.g. voice_id = CwhRBWXzGAHq8TQ4Fs17 for Roger from https://api.elevenlabs.io/v1/voices
|
Hi @monkeydust . You need to add the voice to your "voice library". If you don't, you'll encounter the cryptic "voice_id _does_not_exist" error. To do this, paste the ID from the .env file onto the elevenlabs dashboard and click add. |
@alessandro-neri sorry for delay, so something not right here. I did above using a voice id that works when calling it through their docs with my own key https://elevenlabs.io/docs/api-reference/text-to-speech#/voices/Get_voices_v1_voices_get yet through the app it shows errors with same id per below* - still would process text and fill out the form, that was cool, where it fell down a bit was when it entered things incorrectly and I tried to fix it e.g. spelling of my name, it kept forcing me to the next question but appreciate its a poc. rx-orchestrator | [09:03:14 UTC] DEBUG: Sending to TTS:Let me try that again. Can you please tell me your date of birth, like the month, day, and year? |
@alessandro-neri sorry for delay, so something not right here. I did above using a voice id that works when calling it through their docs with my own key https://elevenlabs.io/docs/api-reference/text-to-speech#/voices/Get_voices_v1_voices_get yet through the app it shows errors with same id per below* - still would process text and fill out the form, that was cool, where it fell down a bit was when it entered things incorrectly and I tried to fix it e.g. spelling of my name, it kept forcing me to the next question but apperciate its a poc. rx-orchestrator | [09:03:14 UTC] DEBUG: Sending to TTS:Let me try that again. Can you please tell me your date of birth, like the month, day, and year? |
Tried using Groq (default) TTS - using same API key for LLM_API_KEY and GROQ_SST_API_KEY but keep getting error below.
I tried changing STT_PROVIDER = "deepgram" and set DG_API_KEY but it always uses Groq and throws same error.
rx-orchestrator | initial response sent to STT
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] INFO: incoming request
2024-09-24 09:35:49 xrx-orchestrator | reqId: "req-1"
2024-09-24 09:35:49 xrx-orchestrator | req: {
2024-09-24 09:35:49 xrx-orchestrator | "method": "GET",
2024-09-24 09:35:49 xrx-orchestrator | "url": "/api/v1/ws",
2024-09-24 09:35:49 xrx-orchestrator | "hostname": "localhost:8000",
2024-09-24 09:35:49 xrx-orchestrator | "remoteAddress": "172.18.0.1",
2024-09-24 09:35:49 xrx-orchestrator | "remotePort": 35752
2024-09-24 09:35:49 xrx-orchestrator | }
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: preValidation hook
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: Connection opened
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: {"host":"localhost:8000","connection":"Upgrade","pragma":"no-cache","cache-control":"no-cache","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0","upgrade":"websocket","origin":"http://localhost:3000","sec-websocket-version":"13","accept-encoding":"gzip, deflate, br, zstd","accept-language":"en-GB,en;q=0.9,en-US;q=0.8","sec-websocket-key":"O5SiDIMkdDvR7cKJQLuidg==","sec-websocket-extensions":"permessage-deflate; client_max_window_bits"}
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: STT Opening WebSocket:ws://xrx-stt:8001/api/v1/ws
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: TTS Opening WebSocket:ws://xrx-tts:8002/api/v1/ws
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: STT WebSocket opened
2024-09-24 09:35:49 xrx-orchestrator | [08:35:48 UTC] DEBUG: TTS WebSocket opened
2024-09-24 09:35:51 xrx-client | ⚠ The "images.domains" configuration is deprecated. Please use "images.remotePatterns" configuration instead.
2024-09-24 09:35:51 xrx-client | ⨯ Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production
2024-09-24 09:35:51 xrx-client | ⨯ Failed to write image to cache 8bP9JR6UNW0uOjfukrlwvbAvrsrDZUbVnRb-NJWyjWk= [Error: EACCES: permission denied, mkdir '/nextjs-client/.next/cache'] {
2024-09-24 09:35:51 xrx-client | errno: -13,
2024-09-24 09:35:51 xrx-client | code: 'EACCES',
2024-09-24 09:35:51 xrx-client | syscall: 'mkdir',
2024-09-24 09:35:51 xrx-client | path: '/nextjs-client/.next/cache'
2024-09-24 09:35:51 xrx-client | }
2024-09-24 09:35:57 xrx-stt | INFO:groq_stt:Transcribing audio using Groq API...
2024-09-24 09:35:57 xrx-stt | INFO:groq_stt:Groq model initialized.
2024-09-24 09:35:58 xrx-stt | INFO:httpx:HTTP Request: POST https://api.groq.com/openai/v1/audio/transcriptions "HTTP/1.1 401 Unauthorized"
2024-09-24 09:35:58 xrx-stt | ERROR: Exception in ASGI application
2024-09-24 09:35:58 xrx-stt | Traceback (most recent call last):
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 244, in run_asgi
2024-09-24 09:35:58 xrx-stt | result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value]
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
2024-09-24 09:35:58 xrx-stt | return await self.app(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
2024-09-24 09:35:58 xrx-stt | await super().call(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 123, in call
2024-09-24 09:35:58 xrx-stt | await self.middleware_stack(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 151, in call
2024-09-24 09:35:58 xrx-stt | await self.app(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call
2024-09-24 09:35:58 xrx-stt | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-09-24 09:35:58 xrx-stt | raise exc
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-09-24 09:35:58 xrx-stt | await app(scope, receive, sender)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 756, in call
2024-09-24 09:35:58 xrx-stt | await self.middleware_stack(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
2024-09-24 09:35:58 xrx-stt | await route.handle(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 373, in handle
2024-09-24 09:35:58 xrx-stt | await self.app(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 96, in app
2024-09-24 09:35:58 xrx-stt | await wrap_app_handling_exceptions(app, session)(scope, receive, send)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2024-09-24 09:35:58 xrx-stt | raise exc
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2024-09-24 09:35:58 xrx-stt | await app(scope, receive, sender)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 94, in app
2024-09-24 09:35:58 xrx-stt | await func(session)
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 348, in app
2024-09-24 09:35:58 xrx-stt | await dependant.call(**values)
2024-09-24 09:35:58 xrx-stt | File "/stt/main.py", line 45, in websocket_endpoint
2024-09-24 09:35:58 xrx-stt | result = await stt_model.transcribe(data)
2024-09-24 09:35:58 xrx-stt | File "/stt/groq_stt.py", line 72, in transcribe
2024-09-24 09:35:58 xrx-stt | transcription = model.audio.transcriptions.create(
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/groq/resources/audio/transcriptions.py", line 118, in create
2024-09-24 09:35:58 xrx-stt | return self._post(
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/groq/_base_client.py", line 1225, in post
2024-09-24 09:35:58 xrx-stt | return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/groq/_base_client.py", line 920, in request
2024-09-24 09:35:58 xrx-stt | return self._request(
2024-09-24 09:35:58 xrx-stt | File "/usr/local/lib/python3.10/site-packages/groq/_base_client.py", line 1018, in _request
2024-09-24 09:35:58 xrx-stt | raise self._make_status_error_from_response(err.response) from None
2024-09-24 09:35:58 xrx-stt | groq.AuthenticationError: Error code: 401 - {'error': {'message': 'Invalid API Key', 'type': 'invalid_request_error', 'code': 'invalid_api_key'}}
2024-09-24 09:35:58 xrx-stt | INFO: connection closed
The text was updated successfully, but these errors were encountered: