Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Speech To Speech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
huggingface
Speech To Speech
Commits
0555d4dc
Commit
0555d4dc
authored
6 months ago
by
Andres Marafioti
Browse files
Options
Downloads
Patches
Plain Diff
pass the current language around
parent
e2c9d968
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
STT/whisper_stt_handler.py
+1
-0
1 addition, 0 deletions
STT/whisper_stt_handler.py
TTS/melo_handler.py
+1
-1
1 addition, 1 deletion
TTS/melo_handler.py
s2s_pipeline.py
+0
-1
0 additions, 1 deletion
s2s_pipeline.py
shared_variables.py
+1
-0
1 addition, 0 deletions
shared_variables.py
with
3 additions
and
2 deletions
STT/whisper_stt_handler.py
+
1
−
0
View file @
0555d4dc
...
...
@@ -8,6 +8,7 @@ import torch
from
baseHandler
import
BaseHandler
from
rich.console
import
Console
import
logging
from
shared_variables
import
current_language
logger
=
logging
.
getLogger
(
__name__
)
console
=
Console
()
...
...
This diff is collapsed.
Click to expand it.
TTS/melo_handler.py
+
1
−
1
View file @
0555d4dc
...
...
@@ -5,6 +5,7 @@ import librosa
import
numpy
as
np
from
rich.console
import
Console
import
torch
from
shared_variables
import
current_language
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -53,7 +54,6 @@ class MeloTTSHandler(BaseHandler):
def
process
(
self
,
llm_sentence
):
console
.
print
(
f
"
[green]ASSISTANT:
{
llm_sentence
}
"
)
global
current_language
if
self
.
language
!=
current_language
:
self
.
model
=
TTS
(
language
=
WHISPER_LANGUAGE_TO_MELO_LANGUAGE
[
self
.
language
],
device
=
self
.
device
)
self
.
speaker_id
=
self
.
model
.
hps
.
data
.
spk2id
[
WHISPER_LANGUAGE_TO_MELO_SPEAKER
[
self
.
language
]]
...
...
This diff is collapsed.
Click to expand it.
s2s_pipeline.py
+
0
−
1
View file @
0555d4dc
...
...
@@ -48,7 +48,6 @@ os.environ["TORCHINDUCTOR_CACHE_DIR"] = os.path.join(CURRENT_DIR, "tmp")
console
=
Console
()
logging
.
getLogger
(
"
numba
"
).
setLevel
(
logging
.
WARNING
)
# quiet down numba logs
current_language
=
"
en
"
def
prepare_args
(
args
,
prefix
):
...
...
This diff is collapsed.
Click to expand it.
shared_variables.py
0 → 100644
+
1
−
0
View file @
0555d4dc
current_language
=
"
en
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment