0

I am working with @aws-sdk/client-transcribe-streaming package with Node js. My code is working fine for single stream. When I create multiple clients of TranscribeStreamingClient for handling different streams at the same time then only first client is working and other clients are on hold until the first client's connection has been closed. So how can I get parallel response and end stream using above package. My code is written below

const {TranscribeStreamingClient,StartStreamTranscriptionCommand} = require("@aws-sdk/client-transcribe-streaming");

let client = new TranscribeStreamingClient({
                credentials: config.get("amazon.credentials"),
                region: config.get("amazon.region"),
            });

let streamResponse = await client.send(
                new StartStreamTranscriptionCommand({
                    LanguageCode: this.audioConfig.languageCode,
                    MediaSampleRateHertz: this.audioConfig.sampleRateHertz,
                    MediaEncoding: this.audioConfig.encoding,
                    AudioStream: audioStream(),
                }),
            );

client.destroy();

I want parallel stream response and end stream as well

I have also follow and look below link but not found any thing for parallel stream. https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-transcribe-streaming/index.html#send-the-speech-stream

1 Answer 1

0

This problem is created because I was using old version of @aws-sdk/client-transcribe-streaming. After update the version and using latest version of this package. Now it is working fine for me and fulfil my requirements.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.