aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

aws sdk cpp sample for transcribe stopped working

Open nicksimultec opened this issue 3 years ago • 14 comments

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug I am following the transcribe cpp sample from the following site https://aws.amazon.com/blogs/developer/real-time-streaming-transcription-with-the-aws-c-sdk/ two months ago the sample was working and I got after two months to run it again and it stopped. When I debug the app it never goes in CaptureAudio call which is part of the request for OnStreamReady call. Any hints?

SDK version number AWS SDK for C++ with Version:1.8.126

Platform/OS/Hardware/Device Windows10

To Reproduce (observed behavior) https://aws.amazon.com/blogs/developer/real-time-streaming-transcription-with-the-aws-c-sdk/

Expected behavior AS it used to work, to get the audio sent and get the transcription back

Logs/output If applicable, add logs or error output.

To enable logging, set the following system properties:

REMEMBER TO SANITIZE YOUR PERSONAL INFO

options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
Aws::InitAPI(options)

Additional context Add any other context about the problem here.

nicksimultec avatar Oct 31 '21 18:10 nicksimultec

👍🏼

alanee1996 avatar Nov 01 '21 10:11 alanee1996

forgot to post the log

[TRACE] 2021-10-30 23:08:11.371 Aws::Utils::Event::EventStreamDecoder [19820] Message received, the expected length of the message is: 188 bytes, and the expected length of the header is: 97 bytes [WARN] 2021-10-30 23:08:11.371 StartStreamTranscriptionHandler [19820] Encountered AWSError 'BadRequestException': A complete signal was sent without the preceding empty frame. [TRACE] 2021-10-30 23:08:11.371 StartStreamTranscriptionHandler [19820] TranscribeStreamingService Errors received, HTTP response code: -1 Resolved remote host IP address: Request ID: Exception name: BadRequestException Error message: A complete signal was sent without the preceding empty frame.

nicksimultec avatar Nov 01 '21 19:11 nicksimultec

more from the log. I am also in talk with the amazon support and they pointed to this

20211105/eu-west-2/transcribe/aws4_request 88e84974bedb85ee4cc6361509c802c577bab3bd618e16484d479d3e9db90bb9 0ba86d758950095113badd553e10b65de77fa5fcfc0b7f9c252c3dc2242dc24e 68af7ea433502b33aa30793fad4dbdaf149a930fcb2f3fc4e8af6a1e47d2c762 [DEBUG] 2021-11-05 01:06:20.926 AWSAuthEventStreamV4Signer [12748] Final computed signing hash: a35f881f9e40e9d25683f02309695cb0366d7a02a6109bbfb1e054acd94d14ca [INFO] 2021-11-05 01:06:20.926 AWSAuthEventStreamV4Signer [12748] Event chunk final signature - a35f881f9e40e9d25683f02309695cb0366d7a02a6109bbfb1e054acd94d14ca [WARN] 2021-11-05 01:06:20.927 WinInetSyncHttpClient [20652] Send request failed: The connection with the server was reset

[DEBUG] 2021-11-05 01:06:20.927 WinInetSyncHttpClient [20652] Closing http request handle 0000000000CC0010 [DEBUG] 2021-11-05 01:06:20.927 WinInetSyncHttpClient [20652] Releasing connection handle 0000000000CC000C [DEBUG] 2021-11-05 01:06:20.927 WinInetConnectionPoolMgr [20652] Releasing connection to endpoint transcribestreaming.eu-west-2.amazonaws.com:443 [DEBUG] 2021-11-05 01:06:20.927 AWSClient [20652] Request returned error. Attempting to generate appropriate error codes from response [ERROR] 2021-11-05 01:06:20.927 AWSClient [20652] HTTP response code: -1 Resolved remote host IP address: Request ID: Exception name: Error message: Encountered network error when sending http request 0 response headers:

nicksimultec avatar Nov 05 '21 01:11 nicksimultec

Hi @nicksimultec , Yea we seem to have a problem with the transcribe streaming sample specific to windows. Working on it...

KaibaLopez avatar Nov 15 '21 18:11 KaibaLopez

Hi @KaibaLopez,

any progress? Thank you

trajcenikolovnick avatar Jan 14 '22 08:01 trajcenikolovnick

Hi @KaibaLopez, I'm also getting the same issue. Any updates from your end?

Thanks Kanishka

kanishkaherath avatar Mar 04 '22 02:03 kanishkaherath

Confirming the same issue under Linux/Ubuntu & Fedora with v1.9.231.

Any workarounds? From the trace it seems that the stream format has changed needing sample headers?

ambitslix avatar Apr 27 '22 00:04 ambitslix

Reproduced on Windows 11 21H2. +1 on wondering if there are workarounds for this

Redrield avatar May 13 '22 18:05 Redrield

It looks like there's not much attention on this issue, so I'm thinking about looking at it myself. It probably works with the other SDKs so I would look and see what's the difference. Not sure when I would have enough time to investigate.

ambitslix avatar May 13 '22 19:05 ambitslix

@ambitslix I'm getting the same error. Any luck bypassing the issue?

ks7585 avatar Jul 08 '22 18:07 ks7585

Same issue on Windows 10. We wanted to integrate our Clarity PBX with the Amazon Transcribe engine and had no luck. Hope development will not ignore the problem. I debugged it from different sides building from sources and switching between different HttpClients. It looks like WinHttp/WinInet libs are not switching to HTTP/2, though in code the flag is specified. And from the other side "Transfer-Encoding: chunked" header is not allowed according to HTTP/2. But WinHttp library does not send the request if neither "Content-Length" nor "Transfer-Encoding" is specified. So I hacked the code a bit to start it working. In the documentation, the recommended way is to use WebSockets, but there is no support for it in the SDK. It looks like Amazon does not invest in the project and it is deprecated. Found following duplicate issues: #1743 #1599 #1805 #1747

AKumkov avatar Aug 12 '22 06:08 AKumkov

Have the same problem with Amazon the transcribe streaming on Windows 10

Kywi avatar Aug 12 '22 08:08 Kywi

Same issue on Windows 10. We wanted to integrate our Clarity PBX with the Amazon Transcribe engine and had no luck. Hope development will not ignore the problem. I debugged it from different sides building from sources and switching between different HttpClients. It looks like WinHttp/WinInet libs are not switching to HTTP/2, though in code the flag is specified. And from the other side "Transfer-Encoding: chunked" header is not allowed according to HTTP/2. But WinHttp library does not send the request if neither "Content-Length" nor "Transfer-Encoding" is specified. So I hacked the code a bit to start it working. In the documentation, the recommended way is to use WebSockets, but there is no support for it in the SDK. It looks like Amazon does not invest in the project and it is deprecated. Found following duplicate issues: #1743 #1599 #1805 #1747

Have the same issue with real-time streaming transcription with the AWS C++ SDK on Windows 10.

artemyarotskyi avatar Aug 12 '22 08:08 artemyarotskyi

Have same problem on windows 10. Hope Amazon take attention to this bug.

karrizzo avatar Aug 14 '22 05:08 karrizzo

Anyone care to tell me what's the plan with this issue? I'm willing to fix it but I need to know if this is going to be deprecated against websockets or propose a fix etc...Anyone from AWS-CPP developer team?

ambitslix avatar Aug 28 '22 20:08 ambitslix

Hello,

I'm from AWS-SDK-CPP team. I can confirm that we are aware of this issue, it is not abandoned and at some point the article with the sample will be reviewed and updated.

Our last guidance for TranscribeStreaming (and other services relying on HTTP/2 streaming) is to build CPP SDK on Windows with Curl HTTP library instead of WinHTTP (because the version of WinHTTP we are using now does not work with HTTP/2 streaming requests). Please refer to the documentation for Building the AWS SDK for C++ on Windows, expandable sub-section under Prerequisites titled "Building the SDK for Windows with curl".

We will try to automate testing of this functionality (transcribe streaming client) and improve overall experience, however, we are not able to provide any estimate (of completion) on this issue.

Best regards, Sergey

SergeyRyabinin avatar Aug 30 '22 16:08 SergeyRyabinin

Thanks Sergey,

Are you saying that under Windows it (TranscribeStreaming) should work with CurL instead of WinHTTP? I assume it should then also work under Linux?

ambitslix avatar Aug 30 '22 20:08 ambitslix

There is now code for transcribe streaming in the example code github. transcribe streaming It has been tested on Windows using an SDK built with the curl library. There are instructions in the ReadMe

meyertst-aws avatar Sep 28 '22 18:09 meyertst-aws

Thanks for the new example @meyertst-aws. If anyone runs into different problems with transcribe streaming please open a new issue.

jmklix avatar Sep 28 '22 19:09 jmklix