diff --git a/README.md b/README.md index 1eece6d..fa07a40 100644 --- a/README.md +++ b/README.md @@ -694,11 +694,12 @@ The API returns a JSON object with the following properties: - **status** Indicates whether the generation was successful (generate-success) or failed (generate-failure).
- **output_file_path** The on-disk location of the generated WAV file.
-- **output_file_url** The HTTP location for accessing the generated WAV file.
+- **output_file_url** The HTTP location for accessing the generated WAV file for browser playback.
+- **output_cache_url** The HTTP location for accessing the generated WAV file as a pushed download.
Example JSON TTS Generation Response: -`{"status": "generate-success", "output_file_path": "C:\text-generation-webui\extensions\alltalk_tts\outputs\myoutputfile_1703149973.wav", "output_file_url": "http://127.0.0.1:7851/audio/myoutputfile_1703149973.wav"}` +`{"status":"generate-success","output_file_path":"C:\\text-generation-webui\\extensions\\alltalk_tts\\outputs\\myoutputfile_1704141936.wav","output_file_url":"http://127.0.0.1:7851/audio/myoutputfile_1704141936.wav","output_cache_url":"http://127.0.0.1:7851/audiocache/myoutputfile_1704141936.wav"}` ### 🔴 Future to-do list - Voice output within the command prompt/terminal (TBD). diff --git a/templates/TTS_Input_Proof_of_concept.html b/templates/TTS_Input_Proof_of_concept.html index 0cb5333..d3cbed2 100644 --- a/templates/TTS_Input_Proof_of_concept.html +++ b/templates/TTS_Input_Proof_of_concept.html @@ -293,6 +293,7 @@
+
@@ -501,6 +502,14 @@ }; } } + + function togglePausePlayback() { + if (audioElement.paused) { + audioElement.play(); + } else { + audioElement.pause(); + } + } function toggleThemeMode() { // Retrieve the value of the selected option for themeMode from the dropdown diff --git a/templates/admin.html b/templates/admin.html index bcb4f2b..52ccb1b 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -243,9 +243,9 @@ cloning/speech generation system. To generate TTS, you can use the provided gradio interface or interact with the server using JSON/CURL commands. 

Note: When loading up a new - character in Text generation webUI it may look like nothing is happening for 20-30 seconds. Its actually + character in Text generation webUI it may look like nothing is happening for 20-30 seconds. It's actually processing the introduction section (greeting message) of the text and once that is completed, it will appear. - You can see the activity occuring in the console window. Refreshing the page multiple times will try force the + You can see the activity occurring in the console window. Refreshing the page multiple times will try force the TTS engine to keep re-generating the text, so please just wait and check the console if needed.

Note: Ensure that your RP character card has asterisks around anything for the narration and double quotes around anything spoken. There @@ -274,7 +274,8 @@ here

Text generation webUI
Web interface link here
Documentation link here

+ target="_blank" rel="noopener">link here +

Back to top of page

Server Information

@@ -407,10 +408,6 @@ const formData = new FormData(form); - // Get and clean the text input from the textarea - let textInput = formData.get('text'); - let cleanedText = textInput.replace(/ \- | \– /g, ' '); // Replace hyphens - // Get and clean the text input from the textarea let textInput = formData.get('text'); let cleanedText = textInput.replace(/ \- | \– /g, ' '); // Replace hyphens @@ -459,7 +456,7 @@

Where are the outputs stored & Automatic output wav file deletion.

Voice outputs are stored in /alltalk_tts/outputs/

-

You can configure automatic maintenence deletion of old wav +

You can configure automatic maintenance deletion of old wav files by setting Del WAV's older than in the settings above.

When Disabled your output wav files will be left untouched. When set to a setting 1 Day or greater, @@ -472,16 +469,18 @@ and store it wherever your OS normally stores it (Windows/Linux/Mac).

How do I create a new voice sample?

-

To create a new voice sample you need to make a wav file that is +

To create a new voice sample, you need to make a wav file that + is 22050Hz, Mono, 16 bit and between 6 to 30 seconds long, though 8 to 10 seconds is usually - good enough. The model can handle up to a 30 second samples, however Ive not noticed any improvement in voice - output from a much longer clips.

+ good enough. The model can handle up to a 30 second samples, however I've not noticed any improvement in voice + output from a much longer clips. +

You want to find a nice clear selection of audio, so lets say you wanted to clone your favourite celebrity. You may go looking for an interview where they are talking. Pay - close attention to the audio you are listening to and trying to sample. Are there noises in the backgroud, hiss + close attention to the audio you are listening to and trying to sample. Are there noises in the background, hiss on the soundtrack, a low humm, some quiet music playing or something? The better quality the audio the better - the final TTS result. Dont forget, the AI that processes the sounds can hear everything in your sample and it + the final TTS result. Don't forget, the AI that processes the sounds can hear everything in your sample and it will use them in the voice its trying to recreate.

Try make your clip one of nice flowing speech, like the included example files. No big pauses, gaps or other sounds. Preferably a sample that the person you are trying to copy @@ -489,10 +488,10 @@ breathy sounds (breathing in/out etc).

Editing your sample!

-

So youve downloaded your favoutie celebrity interview off - Youtube, from here you need to chop it down to 6 to 30 seconds in length and resample it.

+

So, you’ve downloaded your favourite celebrity interview off + YouTube, from here you need to chop it down to 6 to 30 seconds in length and resample it.

If you need to clean it up, do audio processing, volume level - changes etc, do this before downsampling.

Using the latest version of Audacity
Using the latest version of Audacity select/highlight your 6 to 30 second clip and:

                  Tracks > Resample to 22050Hz then
Mix > Stereo to Mono then
                  File > Export Audio saving it as a WAV of 22050Hz.

+ style="color: #3366ff;">WAV of 22050Hz. +

Save your generated wav file in the /alltalk_tts/voices/ folder.

Its worth mentioning that using AI generated audio clips may @@ -510,7 +510,7 @@

Maybe you might be interested in trying Finetuning of the model. Otherwise, the reasons can be that you:

The factory setting for temperature is 0.70

@@ -879,8 +884,8 @@

A basic environment check to ensure everything should work e.g. is the model already downloaded, are the configuration files set correctly etc.

AllTalk will download the Xtts model (version 2.0.2) into - your models folder. Many people didnt like the quality of the 2.0.3 model, however the latest model will be - accessable on the API TTS setting (2.0.3 at the time of writing) so you have the best of both worlds.

+ your models folder. Many people didn't like the quality of the 2.0.3 model, however the latest model will be + accessible on the API TTS setting (2.0.3 at the time of writing) so you have the best of both worlds.

Back to top of page

Custom TTS Models and Model path

@@ -890,8 +895,9 @@ stored on your OS of choice).

Many people did not like the sound quality of the Coqui 2.0.3 model, and as such the AllTalk downloads the 2.0.2 model seperately from the 2.0.3 model that TTS service downloads and manages.

+ style="color: #000000;">2.0.2 model separately from the 2.0.3 model that TTS service downloads and manages. +

Typically the 2.0.2 model is stored in your /alltalk_tts/models folder and it is downloaded on first start-up of the AllTalk_tts extension. However, you may either want to use a custom model @@ -935,7 +941,7 @@

When you are happy it's' working correctly, you are welcome to go delete the models folder stored at /alltalk_tts/models.

If you wish to change the files that the modeldownloader is pulling at startup, - you can futher edit the modeldownload.json and change the https + you can further edit the modeldownload.json and change the https addresses within this files files_to_download section  e.g.

"files_to_download": {
        "LICENSE.txt": "

  • -

    autoplay: Feature not yet available. Enable or +

    autoplay: Enable or disable autoplay. Still needs to be specified in the JSON request.

    -d "autoplay=true"
    -d "autoplay=false"

  • -

    autoplay_volume: Feature not yet available. Set +

    autoplay_volume: Set the autoplay volume. Should be between 0.1 and 1.0. Still needs to be specified in the JSON request.

    -d "autoplay_volume=0.8"

    @@ -1377,12 +1383,12 @@ style="color: black;">            [AllTalk Startup] Warning TTS Subprocess has NOT started up yet, Will keep trying for 80 seconds maximum

    This is normal - behavior if the subprocess is taking a while to start, however, if there is an issue starting the + behaviour if the subprocess is taking a while to start, however, if there is an issue starting the subprocess, you may see multiples of this message and an it will time out after 80 seconds, resulting in the TTS engine not starting. Its likely that you are not in the correct python environment or one that has a TTS engine inside, if this happens, though the system will output a warning about that ahead of this message

    -

    Typically the command line console will output any warning - or error messages. If you need to reset your default configuation, the settings are all listed above in the +

    Typically, the command line console will output any warning + or error messages. If you need to reset your default configuration, the settings are all listed above in the configuration details.

    Back to top of page