Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

seamless_streaming_s2st.py 2.0 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  1. # Copyright (c) Meta Platforms, Inc. and affiliates
  2. # All rights reserved.
  3. #
  4. # This source code is licensed under the license found in the
  5. # MIT_LICENSE file in the root directory of this source tree.
  6. from seamless_communication.streaming.agents.detokenizer import UnitYDetokenizerAgent
  7. from seamless_communication.streaming.agents.offline_w2v_bert_encoder import (
  8. OfflineWav2VecBertEncoderAgent,
  9. )
  10. from seamless_communication.streaming.agents.online_feature_extractor import (
  11. OnlineFeatureExtractorAgent,
  12. )
  13. from seamless_communication.streaming.agents.online_text_decoder import (
  14. UnitYMMATextDecoderAgent,
  15. )
  16. from seamless_communication.streaming.agents.online_unit_decoder import (
  17. NARUnitYUnitDecoderAgent,
  18. )
  19. from seamless_communication.streaming.agents.online_vocoder import VocoderAgent
  20. from seamless_communication.streaming.agents.silero_vad import SileroVADAgent
  21. from seamless_communication.streaming.agents.unity_pipeline import (
  22. UnitYAgentPipeline,
  23. UnitYAgentTreePipeline,
  24. )
  25. class SeamlessStreamingS2STAgent(UnitYAgentPipeline):
  26. pipeline = [
  27. OnlineFeatureExtractorAgent,
  28. OfflineWav2VecBertEncoderAgent,
  29. UnitYMMATextDecoderAgent,
  30. NARUnitYUnitDecoderAgent,
  31. VocoderAgent,
  32. ]
  33. class SeamlessStreamingS2STVADAgent(UnitYAgentPipeline):
  34. pipeline = [
  35. SileroVADAgent,
  36. OnlineFeatureExtractorAgent,
  37. OfflineWav2VecBertEncoderAgent,
  38. UnitYMMATextDecoderAgent,
  39. NARUnitYUnitDecoderAgent,
  40. VocoderAgent,
  41. ]
  42. class SeamlessStreamingS2STJointVADAgent(UnitYAgentTreePipeline):
  43. pipeline = {
  44. SileroVADAgent: [OnlineFeatureExtractorAgent],
  45. OnlineFeatureExtractorAgent: [OfflineWav2VecBertEncoderAgent],
  46. OfflineWav2VecBertEncoderAgent: [UnitYMMATextDecoderAgent],
  47. UnitYMMATextDecoderAgent: [UnitYDetokenizerAgent, NARUnitYUnitDecoderAgent],
  48. UnitYDetokenizerAgent: [],
  49. NARUnitYUnitDecoderAgent: [VocoderAgent],
  50. VocoderAgent: [],
  51. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...