Pergunta

I'm using the Google Text-to-Speech to make a game, but the TTS have a limit of 100 characteres per request. So, I split the text, and I do more than one request to synthesize the complete text.

Now, I have the binary of sound of my text split in two files.

Just doing a simple

$audio1 .= $audio2

doesn't work.

The file type is MPEG, so it's not the same as MP3.

I think I need to clear the headers of the second file, but I dont know how to.

Foi útil?

Solução

I made a test using your URL, it generates MP3 files, after a lookup on Google it could be done:
https://www.dropbox.com/sh/iwbzqdvsxymytgu/c2SaOVjcHY (Hosted on Dropbox for Audio files)

Outras dicas

There is a FFmpeg tool to process media files, example concat two files

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top