Giter Site home page Giter Site logo

Comments (2)

gvimlag avatar gvimlag commented on July 18, 2024 1

synesthesiam, thank you for your response. It led to the solution!
I made one change (changed "> test.wav" to "| aplay -q -r 22050 -c 1 -f S16_LE").

echo "This is a test." |\
curl -X POST -H 'Content-Type: text/plain' --data-binary @- --output - 'http://localhost:5002/api/tts?voice=en' \
| aplay -q -r 22050 -c 1 -f S16_LE

I've discovered a possible bug: (Should I post this problem as a separate issue?)
When one specifies the voice directory with "larynx-server --voice-dir NewDirectory"; the new voice files are NOT downloaded into this directory.

Below are examples showing this problem when downloading the "ljspeech" voice files:

EXAMPLE-1: FAILS.
"larynx-server" downloads the voice files into the WRONG directory

Terminal-1: sudo larynx-server --voices-dir /usr/lib/larynx-tts/local    #specify the new voice directory

Terminal-2: echo "This is a test." | curl -s -X POST -H 'Content-Type: text/plain' --data-binary @- --output - 'http://localhost:5002/api/tts?voice=ljspeech' | aplay -q -r 22050 -c 1 -f S16_LE
Terminal-2: sudo updatedb    #update database of mlocate
Terminal-2: sudo locate ljspeech    #locate voice files
                Output:  WRONG_directory
Terminal-2: sudo rm -rf WRONG_directory   #cleanup for next test

EXAMPLE-2: WORKS.
"larynx" (NOT "Larynx-server") downloads the voice files into CORRECT directory

Terminal-1: sudo larynx --voices-dir /usr/lib/larynx-tts/local -v ljspeech "This is a test." | aplay -q -r 22050 -c 1 -f S16_LE    #specify the new voice directory
Terminal-1: sudo updatedb    #update database of mlocate
Terminal-1: sudo locate ljspeech    #locate voice files
                Output: /usr/lib/larynx-tts/local/us-en/ljspeech-glow_tts/<files>    #CORRECT directory!
Terminal-1: sudo rm -rf /usr/lib/larynx-tts/local/us-en/ljspeech-glow_tts   #cleanup for next test

Again, synesthesiam, thank you for your help.

from larynx.

synesthesiam avatar synesthesiam commented on July 18, 2024

Sure, this is pretty straightforward with curl:

echo 'This is a test.' | \
    curl -X POST -H 'Content-Type: text/plain' --data-binary @- --output - 'http://localhost:5002/api/tts?voice=en'  \
    > test.wav

Hope this helps 🙂

from larynx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.