-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AssemblyAI Plugin #687
base: main
Are you sure you want to change the base?
Conversation
to improve backwards compatibility
1. added dictionary to map from encoding type to bytes per frame 2. clarified the calculation of buffer duration
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ploeber could you review when you get a chance?
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Show resolved
Hide resolved
self._opts = STTOptions( | ||
sample_rate=sample_rate, | ||
word_boost=word_boost, | ||
encoding=encoding, | ||
disable_partial_transcripts=disable_partial_transcripts, | ||
enable_extra_session_information=enable_extra_session_information, | ||
buffer_size_seconds=buffer_size_seconds, | ||
token_expires_in=token_expires_in, | ||
end_utterance_silence_threshold=end_utterance_silence_threshold, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use dependency injection? Because higher-level class than e.g. SpeechStream
which does use DI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just pass in STTOptions
directly as we do in SpeechStream
's init
?
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to update the base README.md and list our plugin there
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
@@ -9,7 +9,7 @@ | |||
|
|||
import pytest | |||
from livekit import agents, rtc | |||
from livekit.plugins import azure, deepgram, google, openai, silero | |||
from livekit.plugins import assemblyai, azure, deepgram, google, openai, silero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we add this new dependency, we need to add ./livekit-plugins/livekit-plugins-assemblyai \
to the tests.yml
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work so far, care to join a shared slack channel to help get this over the finish line? Just need your emails
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
this code will run on server so no need to generate temporary token
The following parameters of `SpeechStream`'s init are redundant with the parameter `opts: STTOptions` - buffer_size_seconds - sample_rate - end_utterance_silence_threshold they have been removed and their corresponding instance attributes have been removed
`prerecorded_transcription_to_speech_event` appears to have been brought over from a copy-paste
@ploeber the |
Extended from PR 419 - #419