(node:89998) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version. #6148
Labels
needs more info
This issue needs more information from the customer to proceed.
Please make sure you have searched for information in the following guides.
A screenshot that you have tested with "Try this API".
(node:89998) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
can't run it
`// Imports the Google Cloud client library
const textToSpeech = require('@google-cloud/text-to-speech');
const fs = require('fs');
const util = require('util');
// The text to synthesize
const text = 'Hello, this is a test of Google Cloud Text-to-Speech.';
// Load the service account key file
const keyFile = '../certs.json'; // Replace with your file path
// Creates a client using the keyfile path
// This is the recommended way to initialize the client
const client = new textToSpeech.TextToSpeechClient({
keyFilename: keyFile
});
async function quickStart() {
// Construct the request
const request = {
input: {text: text},
// Select the language and SSML voice Gender (optional)
voice: {languageCode: 'en-US', ssmlGender: 'NEUTRAL'},
// Select the type of audio file you want returned
audioConfig: {audioEncoding: 'MP3'},
};
const [response] = await client.synthesizeSpeech(request);
// Ensure tmp directory exists
if (!fs.existsSync('./tmp')) {
fs.mkdirSync('./tmp');
}
// Use synchronous file writing instead of promises
fs.writeFileSync('./tmp/output.mp3', response.audioContent, 'binary');
console.log("Audio content written to file --->", './tmp/output.mp3');
}
quickStart();
`
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
i pasted code here
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
just run it
A clear and concise description of what the bug is, and what you expected to happen.
test you darn code before publishing it!
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
recent problem
The text was updated successfully, but these errors were encountered: