From 8a08e9ec67d5cfe47ff684f84c618e862e9d1fdd Mon Sep 17 00:00:00 2001
From: Ettore Di Giacinto <mudler@users.noreply.github.com>
Date: Fri, 20 Dec 2024 10:34:23 +0100
Subject: [PATCH] fix(openvoice): pin numpy before installing torch (#4439)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---
 backend/python/openvoice/requirements-cpu.txt      | 1 -
 backend/python/openvoice/requirements-cublas11.txt | 1 -
 backend/python/openvoice/requirements-cublas12.txt | 1 -
 backend/python/openvoice/requirements-hipblas.txt  | 1 -
 backend/python/openvoice/requirements-intel.txt    | 1 -
 backend/python/openvoice/requirements.txt          | 1 +
 6 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/backend/python/openvoice/requirements-cpu.txt b/backend/python/openvoice/requirements-cpu.txt
index ad679f24..dd2eb221 100644
--- a/backend/python/openvoice/requirements-cpu.txt
+++ b/backend/python/openvoice/requirements-cpu.txt
@@ -2,7 +2,6 @@ torch==2.4.1
 git+https://github.com/myshell-ai/MeloTTS.git
 git+https://github.com/myshell-ai/OpenVoice.git
 whisper-timestamped
-numpy
 pydub==0.25.1
 wavmark==0.0.3
 eng_to_ipa==0.0.2
\ No newline at end of file
diff --git a/backend/python/openvoice/requirements-cublas11.txt b/backend/python/openvoice/requirements-cublas11.txt
index 4edd72ba..84ecc344 100644
--- a/backend/python/openvoice/requirements-cublas11.txt
+++ b/backend/python/openvoice/requirements-cublas11.txt
@@ -3,7 +3,6 @@ torch==2.4.1+cu118
 git+https://github.com/myshell-ai/MeloTTS.git
 git+https://github.com/myshell-ai/OpenVoice.git
 whisper-timestamped
-numpy
 pydub==0.25.1
 wavmark==0.0.3
 eng_to_ipa==0.0.2
\ No newline at end of file
diff --git a/backend/python/openvoice/requirements-cublas12.txt b/backend/python/openvoice/requirements-cublas12.txt
index ad679f24..dd2eb221 100644
--- a/backend/python/openvoice/requirements-cublas12.txt
+++ b/backend/python/openvoice/requirements-cublas12.txt
@@ -2,7 +2,6 @@ torch==2.4.1
 git+https://github.com/myshell-ai/MeloTTS.git
 git+https://github.com/myshell-ai/OpenVoice.git
 whisper-timestamped
-numpy
 pydub==0.25.1
 wavmark==0.0.3
 eng_to_ipa==0.0.2
\ No newline at end of file
diff --git a/backend/python/openvoice/requirements-hipblas.txt b/backend/python/openvoice/requirements-hipblas.txt
index a42d98da..4c2d6649 100644
--- a/backend/python/openvoice/requirements-hipblas.txt
+++ b/backend/python/openvoice/requirements-hipblas.txt
@@ -3,7 +3,6 @@ torch==2.4.1+rocm6.0
 git+https://github.com/myshell-ai/MeloTTS.git
 git+https://github.com/myshell-ai/OpenVoice.git
 whisper-timestamped
-numpy==1.22.0
 pydub==0.25.1
 wavmark==0.0.3
 eng_to_ipa==0.0.2
\ No newline at end of file
diff --git a/backend/python/openvoice/requirements-intel.txt b/backend/python/openvoice/requirements-intel.txt
index e8d07008..43fad1ad 100644
--- a/backend/python/openvoice/requirements-intel.txt
+++ b/backend/python/openvoice/requirements-intel.txt
@@ -10,7 +10,6 @@ librosa==0.9.1
 faster-whisper==0.9.0
 pydub==0.25.1
 wavmark==0.0.3
-numpy
 eng_to_ipa==0.0.2
 inflect==7.0.0
 unidecode==1.3.7
diff --git a/backend/python/openvoice/requirements.txt b/backend/python/openvoice/requirements.txt
index 98be8590..cee412d5 100644
--- a/backend/python/openvoice/requirements.txt
+++ b/backend/python/openvoice/requirements.txt
@@ -8,6 +8,7 @@ openai
 python-dotenv
 pypinyin
 cn2an==0.5.22
+numpy==1.22.0
 networkx==2.8.8
 jieba==0.42.1
 gradio==3.48.0