You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello their I used following code and integrate with Google API to convert speech to text.
In local demo is working fine and call instance and display text. when I load on server than it's called only once than stop execution.
When I speak in local than .on('data', function(data){ calls many time after that auto killed.
On server it's call only once.
/ [START speech_streaming_mic_recognize]
const record = require('node-record-lpcm16');
methods.streamingMicRecognize = function(callback){
// Instantiates a client
const speech = Speech({
projectId: projectId
});
const options = {
config: {
// Configure these settings based on the audio you're transcribing
encoding: 'LINEAR16',
languageCode: 'en-IN',
sampleRate: 16000
}
};
// Create a recognize stream
const recognizeStream = speech.createRecognizeStream(options)
.on('error', function(error){
console.error
})
.on('data', function(data){
process.stdout.write(data.results);
});
// Start recording and send the microphone input to the Speech API
record.start({ sampleRate: 16000 }).pipe(recognizeStream);
console.log('Listening, press Ctrl+C to stop.');
}
The text was updated successfully, but these errors were encountered:
higunjan
changed the title
In local with Google API it's working fine deploy on server it's not working.
In local with Google API it's working fine but, deploy on server it's not working.
Jan 13, 2017
Hello their I used following code and integrate with Google API to convert speech to text.
In local demo is working fine and call instance and display text. when I load on server than it's called only once than stop execution.
When I speak in local than
.on('data', function(data){
calls many time after that auto killed.On server it's call only once.
The text was updated successfully, but these errors were encountered: