pyttsx3 text to speech

I have still not been able to solve why the text to speech button does not give any audio. The problem above is still current I have not been able to debug the issue error.

Please provide the current files.

Verify that the file you showed earlier is the languages/ file.

Also post whatever error messages you are receiving, along with the requests from the console.

Yes I can confirm that the file is from the languages url.
this is the error message I am getting from the console
Not Found: /deck/rehearse/22/text_to_speech/5/
[09/Jun/2024 09:59:24] “POST /deck/rehearse/22/text_to_speech/5/ HTTP/1.1” 404 5458
When I inspect the element this is the message I get
22/:566 Error: SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "… is not valid JSON
(anonymous) @ 22/:566

I have just looked at the data and the In the file, the text_to_speech function is responsible for handling the URL that fetches the audio data for a card’s question and answer. The URL pattern for this view is defined in the cardDesigner/ file as:
path('deck/rehearse/<int:deck_id>/text-to-speech/<int:card_id>/', views.text_to_speech, name='text_to_speech'),

There’s still some information missing here. I can’t determine what’s generating the 404 yet.

At this point then I’d suggest adding some print statements within the view to show what values are being handled at each point. I’d also change the get_object_or_404 to regular queries to verify that you’re getting the data you’re expecting to see.

I am still receiving this error from the terminal
[11/Jun/2024 12:43:43] “GET /deck/rehearse/24/ HTTP/1.1” 200 31996
Not Found: /deck/rehearse/24/text_to_speech/47/
[11/Jun/2024 12:43:49] “POST /deck/rehearse/24/text_to_speech/47/ HTTP/1.1” 404 5461
[11/Jun/2024 12:44:22] “GET /deck/rehearse/24/ HTTP/1.1” 200 31996
Not Found: /deck/rehearse/24/text_to_speech/47/
[11/Jun/2024 12:44:26] “POST /deck/rehearse/24/text_to_speech/47/ HTTP/1.1” 404 5461
C:\Users\botan\Desktop\project\languages\languages\ changed, reloading.
Watching for file changes with StatReloader
Watching for file changes with StatReloader
Performing system checks…

I have performed a logging request but all the terminal shows is the error above. requested logging in the file and also modified the file with the same results?