pplu / aws-sdk-perl

A community AWS SDK for Perl Programmers
Other
170 stars 94 forks source link

Support for transcribe streaming #385

Open cyga opened 4 years ago

cyga commented 4 years ago

First things first, it's a really nice repository.

Secondly, I'm going to work with AWS transcribe streaming. As far as I can see it's not covered here. I'm thinking to contribute to this project. Let me know if I'm wrong or if smbdy is already working on this feature.

Also, I'm already aware that HTTPS/2 doesn't properly work sometimes for streaming. I checked cpp sdk examples for it and I got the same problem as here: https://stackoverflow.com/questions/53743785/amazon-transcribe-streaming-api-without-sdk My code sample for it: https://pastebin.com/9FEj1LDk

But the good news is that Websockets version is working (I checked this JS github repo: https://github.com/aws-samples/amazon-transcribe-websocket-static). Thus, I'm going to code this variant.

Please, let me know if you have any ideas on the topic.

byterock commented 4 years ago

Hmm Working on that today as a matter of fact.

I working witht he 'Kinesis' API and the SubscribetoShard https://docs.aws.amazon.com/kinesis/latest/APIReference/API_SubscribeToShard.html

Which uses Transcibe streaming and I have working at least for text.

Check out this blog post for my progress so far http://blogs.perl.org/users/byterock/2020/03/paws-almost.html

I walk though how to get the encoding working.

I have a prototype .pm that handles the encodeing. I was going to release a little later once I clean up a few other things and finsih off another project but I can change the priority on that and get it out sooner

I will change my priorities for today and get that prototype up on gihub so you can get started and save yourseld a good deal of trouble.

The present .pm if very beta and needs a proper name, tests and support for chunks etc.

Will let you know here when it is up on github

cyga commented 4 years ago

I will change my priorities for today and get that prototype up on gihub so you can get started and save yourseld a good deal of trouble.

Will let you know here when it is up on github

That would be awesome, thanks.

byterock commented 4 years ago

Ok created the repo here

https://github.com/byterock/AWS-EventStream-VND/tree/master/lib/AWS/EventStream

Have a look if you have any questions or addtions feel free to add them in.

There are two versions one in Moose that really just warns what the returned content message and a Pure Perl that uses an array-ref to load up the decoded content.

I think in the long run the both are dead ends but good for testing etc.

I think the long term thing to do is try to make this work with 'AnyEvent'' or 'AnyEvent::IO' as it would be much more flexable.

Cheers John