Maga222006 commited on
Commit
67a7d26
·
1 Parent(s): a574ec0

MultiagentPersonalAssistant

Browse files
agent/multi_agent.py CHANGED
@@ -7,7 +7,6 @@ from sqlalchemy.ext.asyncio import create_async_engine
7
  from langgraph_supervisor import create_supervisor
8
  from langmem.short_term import SummarizationNode
9
  from typing_extensions import TypedDict
10
- from dotenv import load_dotenv
11
  import os
12
 
13
  class State(TypedDict):
 
7
  from langgraph_supervisor import create_supervisor
8
  from langmem.short_term import SummarizationNode
9
  from typing_extensions import TypedDict
 
10
  import os
11
 
12
  class State(TypedDict):
app.py CHANGED
@@ -35,7 +35,7 @@ async def voice_mode(
35
  await assistant.authorization()
36
 
37
  # Preprocess file
38
- transcription = await asyncio.to_thread(preprocess_audio, str(dest))
39
  state_data["message"] = HumanMessage(
40
  content=transcription
41
  )
 
35
  await assistant.authorization()
36
 
37
  # Preprocess file
38
+ transcription = await preprocess_audio(str(dest))
39
  state_data["message"] = HumanMessage(
40
  content=transcription
41
  )
requirements.txt CHANGED
@@ -4,7 +4,6 @@ python-dotenv>=1.1.1
4
  langchain>=0.3.27
5
  langgraph>=0.6.3
6
  openai>=1.99.1
7
- transformers>=4.53.2
8
  timm>=1.0.19
9
  langchain-groq>=0.3.7
10
  langgraph-supervisor>=0.0.29
@@ -12,14 +11,11 @@ wikipedia>=1.4.0
12
  wolframalpha>=5.1.3
13
  python-multipart
14
  soundfile>=0.13.1
15
- accelerate
16
- jsonpointer
17
  langmem>=0.0.29
18
  greenlet>=3.2.3
19
  deepagents>=0.0.3
20
  python-docx>=1.2.0
21
  pydub>=0.25.1
22
- SpeechRecognition>=3.14.3
23
  PyPDF2>=3.0.1
24
  asyncpg>=0.30.0
25
  pillow>=11.3.0
 
4
  langchain>=0.3.27
5
  langgraph>=0.6.3
6
  openai>=1.99.1
 
7
  timm>=1.0.19
8
  langchain-groq>=0.3.7
9
  langgraph-supervisor>=0.0.29
 
11
  wolframalpha>=5.1.3
12
  python-multipart
13
  soundfile>=0.13.1
 
 
14
  langmem>=0.0.29
15
  greenlet>=3.2.3
16
  deepagents>=0.0.3
17
  python-docx>=1.2.0
18
  pydub>=0.25.1
 
19
  PyPDF2>=3.0.1
20
  asyncpg>=0.30.0
21
  pillow>=11.3.0
tmp/classifier.ckpt ADDED
File without changes
tmp/embedding_model.ckpt ADDED
File without changes
tmp/hyperparams.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pretrained_path: speechbrain/lang-id-voxlingua107-ecapa
2
+
3
+
4
+ # Feature parameters
5
+ n_mels: 60
6
+ left_frames: 0
7
+ right_frames: 0
8
+ deltas: false
9
+
10
+ # Number of speakers
11
+ out_n_neurons: 107
12
+
13
+ # Functions
14
+ compute_features: !new:speechbrain.lobes.features.Fbank
15
+ n_mels: 60
16
+ left_frames: 0
17
+ right_frames: 0
18
+ deltas: false
19
+
20
+ embedding_model: !new:speechbrain.lobes.models.ECAPA_TDNN.ECAPA_TDNN
21
+ input_size: 60
22
+ channels: [1024, 1024, 1024, 1024, 3072]
23
+ kernel_sizes: [5, 3, 3, 3, 1]
24
+ dilations: [1, 2, 3, 4, 1]
25
+ attention_channels: 128
26
+ lin_neurons: 256
27
+
28
+
29
+ classifier: !new:speechbrain.lobes.models.Xvector.Classifier
30
+ input_shape: [null, null, 256]
31
+ activation: !name:torch.nn.LeakyReLU
32
+ lin_blocks: 1
33
+ lin_neurons: 512
34
+ out_neurons: !ref <out_n_neurons>
35
+
36
+
37
+ mean_var_norm: !new:speechbrain.processing.features.InputNormalization
38
+ norm_type: sentence
39
+ std_norm: false
40
+
41
+ modules:
42
+ compute_features: !ref <compute_features>
43
+ mean_var_norm: !ref <mean_var_norm>
44
+ embedding_model: !ref <embedding_model>
45
+ classifier: !ref <classifier>
46
+
47
+ label_encoder: !new:speechbrain.dataio.encoder.CategoricalEncoder
48
+
49
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
50
+ loadables:
51
+ embedding_model: !ref <embedding_model>
52
+ classifier: !ref <classifier>
53
+ label_encoder: !ref <label_encoder>
54
+ paths:
55
+ embedding_model: !ref <pretrained_path>/embedding_model.ckpt
56
+ classifier: !ref <pretrained_path>/classifier.ckpt
57
+ label_encoder: !ref <pretrained_path>/label_encoder.txt
tmp/label_encoder.ckpt ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'ab: Abkhazian' => 0
2
+ 'af: Afrikaans' => 1
3
+ 'am: Amharic' => 2
4
+ 'ar: Arabic' => 3
5
+ 'as: Assamese' => 4
6
+ 'az: Azerbaijani' => 5
7
+ 'ba: Bashkir' => 6
8
+ 'be: Belarusian' => 7
9
+ 'bg: Bulgarian' => 8
10
+ 'bn: Bengali' => 9
11
+ 'bo: Tibetan' => 10
12
+ 'br: Breton' => 11
13
+ 'bs: Bosnian' => 12
14
+ 'ca: Catalan' => 13
15
+ 'ceb: Cebuano' => 14
16
+ 'cs: Czech' => 15
17
+ 'cy: Welsh' => 16
18
+ 'da: Danish' => 17
19
+ 'de: German' => 18
20
+ 'el: Greek' => 19
21
+ 'en: English' => 20
22
+ 'eo: Esperanto' => 21
23
+ 'es: Spanish' => 22
24
+ 'et: Estonian' => 23
25
+ 'eu: Basque' => 24
26
+ 'fa: Persian' => 25
27
+ 'fi: Finnish' => 26
28
+ 'fo: Faroese' => 27
29
+ 'fr: French' => 28
30
+ 'gl: Galician' => 29
31
+ 'gn: Guarani' => 30
32
+ 'gu: Gujarati' => 31
33
+ 'gv: Manx' => 32
34
+ 'ha: Hausa' => 33
35
+ 'haw: Hawaiian' => 34
36
+ 'hi: Hindi' => 35
37
+ 'hr: Croatian' => 36
38
+ 'ht: Haitian' => 37
39
+ 'hu: Hungarian' => 38
40
+ 'hy: Armenian' => 39
41
+ 'ia: Interlingua' => 40
42
+ 'id: Indonesian' => 41
43
+ 'is: Icelandic' => 42
44
+ 'it: Italian' => 43
45
+ 'iw: Hebrew' => 44
46
+ 'ja: Japanese' => 45
47
+ 'jw: Javanese' => 46
48
+ 'ka: Georgian' => 47
49
+ 'kk: Kazakh' => 48
50
+ 'km: Central Khmer' => 49
51
+ 'kn: Kannada' => 50
52
+ 'ko: Korean' => 51
53
+ 'la: Latin' => 52
54
+ 'lb: Luxembourgish' => 53
55
+ 'ln: Lingala' => 54
56
+ 'lo: Lao' => 55
57
+ 'lt: Lithuanian' => 56
58
+ 'lv: Latvian' => 57
59
+ 'mg: Malagasy' => 58
60
+ 'mi: Maori' => 59
61
+ 'mk: Macedonian' => 60
62
+ 'ml: Malayalam' => 61
63
+ 'mn: Mongolian' => 62
64
+ 'mr: Marathi' => 63
65
+ 'ms: Malay' => 64
66
+ 'mt: Maltese' => 65
67
+ 'my: Burmese' => 66
68
+ 'ne: Nepali' => 67
69
+ 'nl: Dutch' => 68
70
+ 'nn: Norwegian Nynorsk' => 69
71
+ 'no: Norwegian' => 70
72
+ 'oc: Occitan' => 71
73
+ 'pa: Panjabi' => 72
74
+ 'pl: Polish' => 73
75
+ 'ps: Pushto' => 74
76
+ 'pt: Portuguese' => 75
77
+ 'ro: Romanian' => 76
78
+ 'ru: Russian' => 77
79
+ 'sa: Sanskrit' => 78
80
+ 'sco: Scots' => 79
81
+ 'sd: Sindhi' => 80
82
+ 'si: Sinhala' => 81
83
+ 'sk: Slovak' => 82
84
+ 'sl: Slovenian' => 83
85
+ 'sn: Shona' => 84
86
+ 'so: Somali' => 85
87
+ 'sq: Albanian' => 86
88
+ 'sr: Serbian' => 87
89
+ 'su: Sundanese' => 88
90
+ 'sv: Swedish' => 89
91
+ 'sw: Swahili' => 90
92
+ 'ta: Tamil' => 91
93
+ 'te: Telugu' => 92
94
+ 'tg: Tajik' => 93
95
+ 'th: Thai' => 94
96
+ 'tk: Turkmen' => 95
97
+ 'tl: Tagalog' => 96
98
+ 'tr: Turkish' => 97
99
+ 'tt: Tatar' => 98
100
+ 'uk: Ukrainian' => 99
101
+ 'ur: Urdu' => 100
102
+ 'uz: Uzbek' => 101
103
+ 'vi: Vietnamese' => 102
104
+ 'war: Waray' => 103
105
+ 'yi: Yiddish' => 104
106
+ 'yo: Yoruba' => 105
107
+ 'zh: Chinese' => 106
108
+ ================
109
+ 'starting_index' => 0