Git Product home page Git Product logo

Comments (13)

eheikes avatar eheikes commented on August 17, 2024

I'm not sure I can reproduce this problem. Can you provide me with any of the following info?

  1. Run node -v; ffmpeg -version in the terminal and paste the output here.
  2. What is the exact aws-tts command you are running? (Leave out your access key/secret)
  3. If possible, upload the input text file to pastebin.com or somewhere and link to it here.

from tts.

neonFog avatar neonFog commented on August 17, 2024

from tts.

eheikes avatar eheikes commented on August 17, 2024

Yeah, it looks like ffmpeg is failing to concat the individual MP3 pieces together. It's basically running ffmpeg -f concat -safe 0 -i xxxxxx.txt -c copy to combine the MP3s from AWS.

I tested your text file on my Macbook and it runs fine:

✗ aws-tts Sharott2018txt2Polly.txt Sharott2018.mp3 --format mp3
✔ Reading text
✔ Splitting text
✔ Convert to audio (49/49)
✔ Combine audio
✔ Clean up
✔ Done. Saved to Sharott2018.mp3

I ran it under Node 9.4.0 and the ffmpeg binary that installs with Homebrew (v3.4.1). I also downloaded the snapshot you're using (from https://evermeet.cx/pub/ffmpeg/snapshots/) and it worked too.

So it seems to be a problem with your machine. Are you able to use ffmpeg normally? You should be able to combine 2 or more MP3s using the concat demuxer, as shown on this page and the above command.

The only other thing I can think of is that the temporary files are not being saved correctly. Does running mkdir -p /var/folders/xl/mwfv7m896z1g2fnr6c3mrgy00000gn/T in the terminal work? (There should be no output if it succeeds.)

from tts.

neonFog avatar neonFog commented on August 17, 2024

Thanks for giving it a go.
I don't use ffmpeg for anything else. I installed it just for this purpose.

I made two mp3s, followed the directions at your link and successfully concatenated the files. I ran the command:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp3
It worked and the file plays. So, ffmpeg appears to function.

Perhaps your final intuition is correct. From my desktop, I ran:
mkdir -p /var/folders/xl/mwfv7m896z1g2fnr6c3mrgy00000gn/T
As you warned, there was no output. However, I ran ls -a and no directory was made, neither on my desktop nor at my root dir.

Still, I'm receiving the following error. May these lines suggest that the correct temporary files are not being written?

[mp3 @ 0x7f90dd008000] Format mp3 detected only with low score of 1, misdetection possible!

[mp3 @ 0x7f90dd008000] Failed to read frame size: Could not seek to 1030.
[concat @ 0x7f90dc800000] Impossible to open '/tmp/a2a40612-1a6f-48dd-be66-3d8e73738666.mp3'

/tmp/323574e6-999b-4a8b-a5d4-6a7cf7c88cbf.txt: Invalid argument

I've checked around online for similar errors and restarted my computer. Please let me know if you think of anything. It would be great to resolve this.

from tts.

eheikes avatar eheikes commented on August 17, 2024

I'm not sure what else to try without modifying the aws-tts script itself. Can you save this script and run it?

So if you save it to your desktop as test.js, you can run it on the command line with node ~/Desktop/test.js.

from tts.

neonFog avatar neonFog commented on August 17, 2024

I appreciate it.

Script's terminal output:
All good!

Your interpretation?

from tts.

eheikes avatar eheikes commented on August 17, 2024

I think that rules out one possible problem. Unfortunately, I don't have any more good ideas. I can try adding more debugging to aws-tts to help narrow down the issue, but that will take a bit of work.

from tts.

neonFog avatar neonFog commented on August 17, 2024

Got it. I appreciate it the help

from tts.

eheikes avatar eheikes commented on August 17, 2024

@neonFog I have published a new version that can print out debugging info. Can you install that and try again?

npm install [email protected] -g
export DEBUG=*
tts-cli Sharott2018txt2Polly.txt Sharott2018.mp3 --access-key KEY --format mp3

then copy & paste the output here? It should obscure your AWS credentials if I programmed it correctly.

from tts.

kinnera01 avatar kinnera01 commented on August 17, 2024

I ran into the similar problem, I could fix it by passing my AWS credentials in opts object.

from tts.

eheikes avatar eheikes commented on August 17, 2024

I haven't heard of further problems, so closing for now.

from tts.

brajeshvisio01 avatar brajeshvisio01 commented on August 17, 2024

I ran into the similar problem, I could fix it by passing my AWS credentials in opts object.

@kinnera01 can you please tell me in details to solve this issue, I didn't get opts object.

from tts.

eheikes avatar eheikes commented on August 17, 2024

@brajeshvisio01 The credentials can be included through the --access-key and --secret-key options on the command line -- see the docs. That's my best guess for what kinnera01 meant.

If you're still running into problems, can you open a new issue and I will investigate?

npm install [email protected] -g
export DEBUG=*
tts-cli <REST OF YOUR COMAND HERE>

from tts.

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.