aws-sdk-cpp
aws-sdk-cpp copied to clipboard
aws sdk cpp sample for transcribe stopped working
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x ] I've gone though Developer Guide and API reference
- [ x] I've searched for previous similar issues and didn't find any solution
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.
👍🏼
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.
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:
Hi @nicksimultec , Yea we seem to have a problem with the transcribe streaming sample specific to windows. Working on it...
Hi @KaibaLopez,
any progress? Thank you
Hi @KaibaLopez, I'm also getting the same issue. Any updates from your end?
Thanks Kanishka
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?
Reproduced on Windows 11 21H2. +1 on wondering if there are workarounds for this
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 I'm getting the same error. Any luck bypassing the issue?
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 problem with Amazon the transcribe streaming on Windows 10
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.
Have same problem on windows 10. Hope Amazon take attention to this bug.
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?
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
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?
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
Thanks for the new example @meyertst-aws. If anyone runs into different problems with transcribe streaming please open a new issue.