agents icon indicating copy to clipboard operation
agents copied to clipboard

plugins: add AWS Transcribe and Polly TTS plugin

Open dasxran opened this issue 1 year ago • 4 comments

This PR makes the following changes:

  • Support for AWS Polly Text-to-Speech (TTS)
  • Support for AWS Transcribe Speech-to-Text (STT)

dasxran avatar Jul 20 '24 10:07 dasxran

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 20 '24 10:07 CLAassistant

⚠️ No Changeset found

Latest commit: 32e8f32af6b03ca158f17fec4dda1399b50ba17f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jul 28 '24 16:07 changeset-bot[bot]

thanks for the PR. we'll review this week and hope to get it merged

davidzhao avatar Jul 28 '24 19:07 davidzhao

Thank you @davidzhao . Moving to Draft to until v0.8.0 changes are done

dasxran avatar Jul 29 '24 17:07 dasxran

Any Updates on the AWS Plugin, to merge it ?? I am planning to use livekit but i want to use the AWS plugin

TarekWSw avatar Nov 18 '24 13:11 TarekWSw

Any Updates on the AWS Plugin, to merge it ?? I am planning to use livekit but i want to use the AWS plugin

+1 I'm using the plugin from months ago without issues

lusob avatar Nov 21 '24 11:11 lusob

Hye folks, should we consider reviewing this and getting it merged? I am also looking into using AWS Polly

vanics avatar Dec 08 '24 21:12 vanics

Hye folks, should we consider reviewing this and getting it merged? I am also looking into using AWS Polly

will have a look this week. hoping to getting it merged soon

davidzhao avatar Dec 09 '24 05:12 davidzhao

Any Updates on the AWS Plugin, to merge it ?? I am planning to use livekit but i want to use the AWS plugin

+1 I'm using the plugin from months ago without issues

Did you modify anything in the implementation because when i used it, it raised an error

{"message": "unhandled exception while running the job task\nTraceback (most recent call last):\n File "/s2t/transcribe_aws.py", line 40, in entrypoint\n stt_impl = STT()\n ^^^^^\nTypeError: Can't instantiate abstract class STT with abstract method _recognize_impl", "level": "ERROR", "name": "livekit.agents", "pid": 67147, "job_id": "AJ_UZqizXpe4jEn", "timestamp": "2024-12-14T09:01:45.740554+00:00"}

` from livekit.plugins import aws

async def entrypoint(ctx: JobContext): stt_impl = aws.STT()

if not stt_impl.capabilities.streaming:
    stt_impl = stt.StreamAdapter(
        stt=stt_impl,
        vad=silero.VAD.load(
            min_silence_duration=0.2,
        ),
    )

async def transcribe_track(participant: rtc.RemoteParticipant, track: rtc.Track):
    audio_stream = rtc.AudioStream(track)
    stt_forwarder = transcription.STTSegmentsForwarder(
        room=ctx.room, participant=participant, track=track
    )

    stt_stream = stt_impl.stream()
    asyncio.create_task(_forward_transcription(stt_stream, stt_forwarder))

    async for ev in audio_stream:
        stt_stream.push_frame(ev.frame)

`

TarekWSw avatar Dec 14 '24 09:12 TarekWSw

there's been quite a few changes since the PR is originally opened, and I think we'll need to bring it up to date before merging.

@dasxran could you give me write access to this repo? I'd be glad to fix up a few things before merging

davidzhao avatar Dec 14 '24 09:12 davidzhao

@davidzhao I've already created a new branch from this branch with latest changes https://github.com/livekit/agents/tree/aws-tts-stt

jayeshp19 avatar Dec 14 '24 11:12 jayeshp19

@davidzhao I've already created a new branch from this branch with latest changes https://github.com/livekit/agents/tree/aws-tts-stt

Is the version on this branch functional, because it seems to result in the same error !

TarekWSw avatar Dec 14 '24 16:12 TarekWSw

@TarekWSw Not yet, we will soon merge it to main

jayeshp19 avatar Dec 14 '24 16:12 jayeshp19

@davidzhao @jayeshp19 please let me know if i can help in anything in order to merge this ASAP

TarekWSw avatar Dec 16 '24 07:12 TarekWSw

any update on this ?

miron-l avatar Jan 12 '25 09:01 miron-l

Any ETA on when this will be available?

meetakshay99 avatar Feb 07 '25 05:02 meetakshay99

please follow this PR, which supersedes the current one.

davidzhao avatar Feb 07 '25 07:02 davidzhao