Skip to content

Commit

Permalink
ychwanegu benyw-gogledd
Browse files Browse the repository at this point in the history
  • Loading branch information
DewiBrynJones committed Mar 12, 2021
1 parent 81ad56a commit 2e71549
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ WORKDIR ${MARYTTS_HOME}

RUN update-marytts-server-cy.sh

RUN voice-download.sh wispr
RUN voice-download.sh wispr \
&& voice-download.sh benyw-gogledd

EXPOSE 59125

3 changes: 1 addition & 2 deletions server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ build:
cp installed-voices.txt ${VOICES_DIR}/; \
fi
docker build --rm -t techiaith/marytts-server:${MARYTTS_CY_VERSION} \
--build-arg MARYTTS_CY_VERSION=${MARYTTS_CY_VERSION} \
.
--build-arg MARYTTS_CY_VERSION=${MARYTTS_CY_VERSION} .


run:
Expand Down
7 changes: 4 additions & 3 deletions server/cherrypy/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ def speak(self, text, uid='wispr', lang='cy', format='mp3', **kwargs):
raise ValueError("'lang' must be either 'cy' or 'en_US'")
except ValueError as e:
return "ERROR: %s" % str(e)

is_wispr = (uid.lower() == 'wispr')
if is_wispr:

cherrypy.log(str(self.installed_voices))
is_voice = uid.lower() in self.installed_voices
if is_voice:
voice = uid
else:
voice = uid + "_" + lang
Expand Down
3 changes: 2 additions & 1 deletion server/installed-voices.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
wispr
wispr
benyw-gogledd

0 comments on commit 2e71549

Please sign in to comment.