Commit Graph

29 Commits

Author SHA1 Message Date
GuizzyQC
5011f94659
Improved compatibility between silero and sd_api_pictures (#1196) 2023-04-16 21:18:52 -03:00
oobabooga
49ce866c99 Fix silero_tts 2023-04-12 00:58:11 -03:00
oobabooga
1dc464dcb0 Sort imports 2023-04-07 14:42:03 -03:00
Φφ
e563b015d8
Silero TTS offline cache (#628) 2023-04-07 12:15:57 -03:00
oobabooga
1c413ed593 Remove torch from silero 2023-04-07 11:51:50 -03:00
da3dsoul
3f922d4bfb
Extract the Preprocessing for Silero into a file and Improve it (#757) 2023-04-07 11:46:29 -03:00
oobabooga
b0890a7925 Add shared.is_chat() function 2023-04-01 20:15:00 -03:00
Φφ
1a1e420e65 Silero_tts streaming fix
Temporarily suppress the streaming during the audio response as it would interfere with the audio (making it stutter and play anew)
2023-03-25 21:33:30 +03:00
oobabooga
104212529f
Minor changes 2023-03-22 15:55:03 -03:00
Φφ
5389fce8e1 Extensions performance & memory optimisations
Reworked remove_surrounded_chars() to use regular expression ( https://regexr.com/7alb5 ) instead of repeated string concatenations for elevenlab_tts, silero_tts, sd_api_pictures. This should be both faster and more robust in handling asterisks.

Reduced the memory footprint of send_pictures and sd_api_pictures by scaling the images in the chat to 300 pixels max-side wise. (The user already has the original in case of the sent picture and there's an option to save the SD generation).
This should fix history growing annoyingly large with multiple pictures present
2023-03-22 11:51:00 +03:00
oobabooga
3fb8196e16 Implement "*Is recording a voice message...*" for TTS #303 2023-03-13 22:28:00 -03:00
stefanhamburger
91c2a8e88d
Fix: tuple object does not support item assignment 2023-03-13 07:42:09 +01:00
oobabooga
77294b27dd Use str(Path) instead of os.path.abspath(Path) 2023-03-13 00:08:01 -03:00
oobabooga
1ddcd4d0ba Clean up silero_tts
This should only be used with --no-stream.

The shared.still_streaming implementation was faulty by design:
output_modifier should never be called when streaming is already over.
2023-03-12 23:42:49 -03:00
oobabooga
4066ab4c0c Reorder the imports 2023-03-12 13:36:18 -03:00
Xan
d4afed4e44 Fixes and polish
- Change wav naming to be completely unique using timestamp instead of message ID, stops browser using cached audio when new audio is made with the same file name (eg after regenerate or clear history).
- Make the autoplay setting actually disable autoplay.
- Make Settings panel a bit more compact.
- Hide html errors when audio file of chat history is missing.
- Add button to permanently convert TTS history to normal text messages
- Changed the "show message text" toggle to affect the chat history.
2023-03-12 17:56:57 +11:00
oobabooga
8f8da6707d Minor style changes to silero_tts 2023-03-11 11:17:13 -03:00
Xan
0dfac4b777 Working html autoplay, clean up, improve wav naming
- New autoplay using html tag, removed from old message when new input provided
- Add voice pitch and speed control
- Group settings together
- Use name + conversation history to match wavs to messages, minimize problems when changing characters

Current minor bugs:
- Gradio seems to cache the audio files, so using "clear history" and generating new messages will play the old audio (the new messages are saving correctly). Gradio will clear cache and use correct audio after a few messages or after a page refresh.
- Switching characters does not immediately update the message ID used for the audio. ID is updated after the first new message, but that message will use the wrong ID
2023-03-11 16:34:59 +11:00
Xan
a2b5383398 Merge in audio generation only on text stream finish., postpone audioblock autoplay
- Keeping simpleaudio until audio block "autoplay" doesn't play previous messages
- Only generate audio for finished messages
- Better name for autoplay, clean up comments
- set default to unlimited wav files. Still a few bugs when wav id resets

Co-Authored-By: Christoph Hess <9931495+ChristophHess@users.noreply.github.com>
2023-03-09 10:48:44 +11:00
Xan
738be6dd59 Fix merge errors and unlimited wav bug 2023-03-08 22:25:55 +11:00
Xan
5648a41a27 Merge branch 'main' of https://github.com/xanthousm/text-generation-webui 2023-03-08 22:08:54 +11:00
Xan
ad6b699503 Better TTS with autoplay
- Adds "still_streaming" to shared module for extensions to know if generation is complete
- Changed TTS extension with new options:
   - Show text under the audio widget
   - Automatically play the audio once text generation finishes
   - manage the generated wav files (only keep files for finished generations, optional max file limit)
   - [wip] ability to change voice pitch and speed
- added 'tensorboard' to requirements, since python sent "tensorboard not found" errors after a fresh installation.
2023-03-08 22:02:17 +11:00
oobabooga
44e6d82185 Remove unused imports 2023-03-07 22:56:15 -03:00
oobabooga
ef91bd802d Sort TTS voices by gender 2023-02-26 02:26:15 -03:00
oobabooga
e51ece21c0 Add ui() function to extensions 2023-02-24 19:00:11 -03:00
oobabooga
cb226247e8 Make it possible to disable the TTS from within the interface 2023-02-16 23:38:27 -03:00
oobabooga
bde4cd402a Change the default TTS voice 2023-02-16 16:07:38 -03:00
oobabooga
79d3a524f2 Add a file 2023-02-14 15:18:05 -03:00
oobabooga
f6bf74dcd5 Add Silero TTS extension 2023-02-14 15:06:06 -03:00