I have tried replacing “\n” with “\n”, still not wroking…
google_credentials = json.loads(st.secrets['GOOGLE_APPLICATION_CREDENTIALS'])
creds = Credentials.from_service_account_info(google_credentials)
client = texttospeech.TextToSpeechClient(credentials=creds)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 168 (char 167)
In secret like:
GOOGLE_APPLICATION_CREDENTIALS = """
{
"type": "service_account",
"project_id": "your_project_id",
...
}
"""