Toadoum commited on
Commit
6edbaa2
Β·
verified Β·
1 Parent(s): 9c6a172

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +29 -28
requirements.txt CHANGED
@@ -1,40 +1,41 @@
1
  # ── PlotWeaver Hausa Voice AI Agent ──────────────────────────────────────────
2
- # Versions verified by actually launching the app (see test_app.py), not by
3
- # assumption. Two things were caught this way:
4
- # * gradio 4.44 is now BROKEN against current huggingface_hub (HfFolder was
5
- # removed) β€” a fresh Space build on 4.44 fails at import.
6
- # * `stream_every` on Audio.stream does not exist before gradio 5.
7
- # Keep sdk_version in README.md frontmatter in sync with the gradio pin below.
8
-
9
- gradio>=5.49.0,<6.0.0 # Audio.stream(stream_every=...) + gr.skip()
 
 
 
 
 
 
 
 
 
10
 
11
  # ── Core ML ──────────────────────────────────────────────────────────────────
12
- torch>=2.2.0 # Whisper, NLLB, MMS, Silero VAD
13
  transformers>=4.40.0 # >=4.40 required for VitsModel (MMS-TTS)
14
  sentencepiece>=0.2.0 # NLLB tokenizer β€” NOT optional
15
  accelerate>=0.28.0 # device placement
16
- protobuf>=4.25.0 # slow→fast tokenizer conversion for NLLB
17
 
18
- # ── Audio ────────────────────────────────────────────────────────────────────
19
- numpy>=1.26.0,<3.0.0
20
  scipy>=1.12.0 # scipy.signal.resample β€” the only resampler used
21
- soundfile>=0.12.1 # Gradio audio I/O backend
22
 
23
  # ── Misc ─────────────────────────────────────────────────────────────────────
24
- requests>=2.31.0 # WhatsApp Cloud API, Zendesk, HF Inference API
25
-
26
- # ── Optional ─────────────────────────────────────────────────────────────────
27
- # torchaudio is NOT required by this app, but Silero VAD imports it via
28
- # torch.hub. Without it the built-in energy VAD is used instead, which works
29
- # fine β€” uncomment only if you want Silero's noise robustness.
30
- # torchaudio>=2.2.0
31
- #
32
- # Only needed with SIP_PROVIDER=twilio and real credentials; sip.py imports it
33
- # lazily, so the demo never touches it.
34
- # twilio>=9.0.0
35
 
36
  # ── Deliberately absent ──────────────────────────────────────────────────────
37
- # librosa β€” resampling uses scipy.signal.resample.
38
- # silero-vad β€” loaded via torch.hub with an energy-VAD fallback.
39
- # audioop β€” removed from the stdlib in Python 3.13; G.711 mu-law decoding
40
- # is implemented in numpy in integrations/sip.py.
 
 
 
 
 
1
  # ── PlotWeaver Hausa Voice AI Agent ──────────────────────────────────────────
2
+ #
3
+ # CRITICAL: do NOT add gradio here.
4
+ #
5
+ # A Gradio Space installs its own gradio from `sdk_version` in README.md
6
+ # frontmatter, as:
7
+ # pip install -r requirements.txt gradio[oauth,mcp]==<sdk_version> ...
8
+ # Any gradio pin in this file is resolved against that in the SAME pip
9
+ # command, so a mismatch is an unresolvable conflict and the build dies with
10
+ # ResolutionImpossible. To change the gradio version, edit `sdk_version` in
11
+ # README.md β€” never this file.
12
+ #
13
+ # For the same reason, avoid pinning anything the Space base image already
14
+ # constrains. The base image installs "protobuf<4" and "click<8.1"; requesting
15
+ # protobuf>=4 here is a guaranteed build failure.
16
+ #
17
+ # The base image is Python 3.13, which removed the `audioop` stdlib module β€”
18
+ # integrations/sip.py implements G.711 mu-law decoding in numpy for that reason.
19
 
20
  # ── Core ML ──────────────────────────────────────────────────────────────────
21
+ torch>=2.2.0 # Whisper, NLLB, MMS
22
  transformers>=4.40.0 # >=4.40 required for VitsModel (MMS-TTS)
23
  sentencepiece>=0.2.0 # NLLB tokenizer β€” NOT optional
24
  accelerate>=0.28.0 # device placement
 
25
 
26
+ # ── Audio / numeric ──────────────────────────────────────────────────────────
27
+ numpy>=1.26.0
28
  scipy>=1.12.0 # scipy.signal.resample β€” the only resampler used
 
29
 
30
  # ── Misc ─────────────────────────────────────────────────────────────────────
31
+ requests>=2.31.0 # WhatsApp Cloud API, Zendesk, HF Inference router
 
 
 
 
 
 
 
 
 
 
32
 
33
  # ── Deliberately absent ──────────────────────────────────────────────────────
34
+ # gradio β€” injected by the Space from README sdk_version (see above).
35
+ # protobuf β€” base image pins <4; do not fight it.
36
+ # soundfile β€” comes with gradio.
37
+ # torchaudio β€” only needed for Silero VAD; the energy VAD fallback is used
38
+ # otherwise. Uncomment if you want Silero's noise robustness.
39
+ # twilio β€” only for SIP_PROVIDER=twilio; sip.py imports it lazily.
40
+ # librosa β€” resampling uses scipy.signal.resample.
41
+ # audioop β€” removed in Python 3.13; mu-law decode is numpy in sip.py.