Compare commits

...
28 Commits
Author SHA1 Message Date
erew123 c657a2aac6 Capture wildcards in requirements 2023-12-20 08:52:00 +00:00
erew123 af99748441 Update issue templates 2023-12-20 08:38:15 +00:00
erew123 db87427e7c Update README.md
Added diagnostics details.
2023-12-20 08:13:03 +00:00
erew123 c9b82034f0 diagnostics
added colour identifiers to the output on screen.
2023-12-20 02:18:43 +00:00
erew123 96aef2c1be Updating docs CURL
Curl command rendered incorrectly in HTML, so corrected
2023-12-20 01:12:45 +00:00
erew123 a3958a6437 Update README.md 2023-12-19 17:11:13 +00:00
erew123 485aca2e6c Update .gitignore
added diagnostics.log
2023-12-19 17:08:44 +00:00
erew123 88d588bb44 Update README.md 2023-12-19 16:47:45 +00:00
erew123 9cc98c7c31 Update issue templates 2023-12-19 16:45:40 +00:00
erew123 69acc1f74a Update issue templates 2023-12-19 16:44:41 +00:00
erew123 d8be718a30 Update README.md
Referenced the diagnostics utility in the Help section.
2023-12-19 16:38:49 +00:00
erew123 efd3a0add3 Documentation & Diagnostics
Cleaned up the built in documentation. 
Also added diagnostics.py to help with diagnosing anyone's problems.
2023-12-19 16:33:06 +00:00
erew123 55ecdfcf1f License 2023-12-19 08:36:53 +00:00
erew123 fab8d28802 Update issue templates 2023-12-19 02:05:55 +00:00
erew123 72992729f9 Update issue templates 2023-12-19 02:04:59 +00:00
erew123 7c5d843c61 Update README.md
Added a few extra details to DeepSpeed installs and uninstalls. Covering all bases.
2023-12-18 23:47:19 +00:00
erew123 19a66fdba4 Update README.md 2023-12-18 23:18:31 +00:00
erew123 5c88f43083 Full tidy of ReadME 2023-12-18 09:02:17 +00:00
erew123 6ef01a83a8 Update README.md
minor correction
2023-12-18 00:39:52 +00:00
erew123 cd2e5396a0 Update README.md 2023-12-17 18:36:14 +00:00
erew123 7e590d6e69 Update README.md 2023-12-17 18:35:23 +00:00
erew123 92e360feed Update README.md 2023-12-17 18:34:27 +00:00
erew123 5015b9e4da Update .gitignore 2023-12-17 12:47:09 +00:00
erew123 1131084e2f Update README.md 2023-12-17 12:46:30 +00:00
erew123 8fab3e8183 Update README.md 2023-12-17 12:42:59 +00:00
erew123 6f4df9e3b1 Update README.md 2023-12-17 12:28:29 +00:00
erew123 7223b3bc26 Update README.md 2023-12-17 12:25:00 +00:00
erew123 48a02da11d Update README.md 2023-12-17 12:18:57 +00:00
8 changed files with 1522 additions and 439 deletions

No files matched your search

@@ -0,0 +1,32 @@
---
name: Bug report/Support request
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
Please generate a diagnostics report and upload the "diagnostics.log".
https://github.com/erew123/alltalk_tts/tree/main?#-how-to-make-a-diagnostics-report-file
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behaviour:
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Text/logs**
If applicable, copy/paste in your logs here from the console.
**Desktop (please complete the following information):**
AllTalk was updated: [approx. date]
Custom Python environment: [yes/no give details if yes]
Text-generation-webUI was updated: [approx. date]
**Additional context**
Add any other context about the problem here.
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+2
View File
@@ -1,5 +1,7 @@
voices/*.* voices/*.*
models/*.* models/*.*
outputs/*.* outputs/*.*
config.json
confignew.json confignew.json
models.json models.json
diagnostics.log
+661
View File
@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
+158 -59
View File
@@ -3,7 +3,7 @@ AllTalk is an updated version of the Coqui_tts extension for Text Generation web
- **Custom Start-up Settings:** Adjust your default start-up settings. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots) - **Custom Start-up Settings:** Adjust your default start-up settings. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots)
- **Narrarator:** Use different voices for main character and narration. [Example Narration](https://vocaroo.com/18fYWVxiQpk1) - **Narrarator:** Use different voices for main character and narration. [Example Narration](https://vocaroo.com/18fYWVxiQpk1)
- **Low VRAM mode:** Improve generation performance if your VRAM is filled by your LLM. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots) - **Low VRAM mode:** Great for people with small GPU memory or if your VRAM is filled by your LLM. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots)
- **DeepSpeed:** A 3-4x performance boost generating TTS. [DeepSpeed Windows/Linux Instructions](https://github.com/erew123/alltalk_tts?tab=readme-ov-file#deepspeed-installation-options) [Screenshot](https://github.com/erew123/alltalk_tts/assets/35898566/548619c8-5f1b-47d0-a73d-54d2fee3f3db) - **DeepSpeed:** A 3-4x performance boost generating TTS. [DeepSpeed Windows/Linux Instructions](https://github.com/erew123/alltalk_tts?tab=readme-ov-file#deepspeed-installation-options) [Screenshot](https://github.com/erew123/alltalk_tts/assets/35898566/548619c8-5f1b-47d0-a73d-54d2fee3f3db)
- **Local/Custom models:** Use any of the XTTSv2 models (API Local and XTTSv2 Local). - **Local/Custom models:** Use any of the XTTSv2 models (API Local and XTTSv2 Local).
- **Optional wav file maintenance:** Configurable deletion of old output wav files. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots) - **Optional wav file maintenance:** Configurable deletion of old output wav files. [Screenshot](https://github.com/erew123/alltalk_tts#screenshots)
@@ -21,18 +21,9 @@ AllTalk is an updated version of the Coqui_tts extension for Text Generation web
- 🔴 [Future to-do list & Upcoming updates](https://github.com/erew123/alltalk_tts?#-future-to-do-list) - 🔴 [Future to-do list & Upcoming updates](https://github.com/erew123/alltalk_tts?#-future-to-do-list)
#### Updates #### Updates
The latest build (13 Dec 2023) has had the entire text filtering engine and narration engine rebuilt from scratch. It's highly complicated how its actually working, but the end result it a much clearer TTS output and much better control over the narrator option and how to handle text that isnt within quotes or asterisks. Its a highly recommened update, for the improved quality it gives to the TTS output, if nothing else. The latest build (13 Dec 2023) has had the entire text filtering engine and narration engine rebuilt from scratch. It's highly complicated how its actually working, but the end result it a much clearer TTS output and much better control over the narrator option and how to handle text that isnt within quotes or asterisks. It does however mean you need to ensure your character card is set up correctly if using the narrator function. Details are below in the installation notes.
Should you want the older version of the narrator engine+text filtering, I will leave this older copy [here](https://github.com/erew123/alltalk_tts/releases/tag/v1-old-narrator) DeepSpeed **v11.2** can be installed within the **default text-generation-webui Python 3.11 environment**. Installs in custom Python environments are possible, but can be more complicated. Instructions [here](https://github.com/erew123/alltalk_tts##deepspeed-installation-options) (or scroll down).
DeepSpeed **v11.2** can be installed within the **default text-generation-webui Python 3.11 environment**. Instructions [here](https://github.com/erew123/alltalk_tts#deepspeed-112-for-windows--python-311) (or scroll down). Please note, this is **not** an official Microsoft method (currently) so they will not support you with this style installation. Officially, only DeepSpeed v8.3 is installing on Python 3.9.x.
#### The one thing I cant easily work around
With a RP chat with your AI, **on your character card** `parameters menu` > `character tab` > `greeting` make sure that anything in there that is the **narrator is in asterisks** and anything **spoken is in double quotes**, then hit the `save` (disk) button. Greeting paragraphs/sentences are handled differently from how the AI sends text and so its difficut to account for them both.
I could force a delimeter in at this stage, but I know it would/may affect things further down the line in the chat and I need a good think about that before just making a change. This issue **only** affects the greeting card/start of conversation and the "example" card that comes with text-generation-webui suffers this issue (if you want to try it for yourself). So you would put double quotes around like this (from the example card):
`"`Hey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers. I'm sure you have a wealth of knowledge that I can learn from.`"`
## 🟩 Installation on Text generation web UI ## 🟩 Installation on Text generation web UI
This has been tested on the current Dec 2023 release of Text generation webUI. If you have not updated it for a while, you may wish to update Text generation webUI, [instructions here](https://github.com/oobabooga/text-generation-webui?tab=readme-ov-file#how-to-install) This has been tested on the current Dec 2023 release of Text generation webUI. If you have not updated it for a while, you may wish to update Text generation webUI, [instructions here](https://github.com/oobabooga/text-generation-webui?tab=readme-ov-file#how-to-install)
@@ -56,28 +47,29 @@ This has been tested on the current Dec 2023 release of Text generation webUI. I
*Nvidia graphics card machines* - `pip install -r requirements_nvidia.txt`<br><br> *Nvidia graphics card machines* - `pip install -r requirements_nvidia.txt`<br><br>
*Other machines (mac, amd etc)* - `pip install -r requirements_other.txt` *Other machines (mac, amd etc)* - `pip install -r requirements_other.txt`
7) **(Optional DeepSpeed)** If you have an Nvidia Graphics card on a system running Linux or Windows and wish to use **DeepSpeed** please follow these instructions [here](https://github.com/erew123/alltalk_tts?#-deepspeed-installation-options). Though you may wish to check things are generally working with the below steps before installing DeepSpeed. 7) **(Optional DeepSpeed)** If you have an Nvidia Graphics card on a system running Linux or Windows and wish to use **DeepSpeed** please follow these instructions [here](https://github.com/erew123/alltalk_tts?#-deepspeed-installation-options). **However**, I would highly reccommend before you install DeepSpeed, you start text-generation-webui up, confirm AllTalk starts correctly and everything is working, as DeepSpeed can add another layer of complications troubleshooting any potential start-up issues. If necessary you can `pip uninstall deepspeed`.
8) You can now start move back to the main Text generation webUI folder `cd ..` (a few times), start Text generation webUI (`start_windows.bat`,`./start_linux.sh`, `start_macos.sh` or `start_wsl.bat`) and load the AllTalk extension in the Text generation webUI **session** tab. 8) You can now start move back to the main Text generation webUI folder `cd ..` (a few times), start Text generation webUI (`start_windows.bat`,`./start_linux.sh`, `start_macos.sh` or `start_wsl.bat`) and load the AllTalk extension in the Text generation webUI **session** tab.
9) Please read the note below about start-up times and also the note above about ensuring your character cards are set up [correctly](https://github.com/erew123/alltalk_tts#the-one-thing-i-cant-easily-work-around) 9) Please read the note below about start-up times and also the note about ensuring your character cards are set up [correctly](https://github.com/erew123/alltalk_tts#the-one-thing-i-cant-easily-work-around)
10) Some extra voices downloadable [here](https://drive.google.com/file/d/1bYdZdr3L69kmzUN3vSiqZmLRD7-A3M47/view?usp=drive_link) 10) Some extra voices downloadable [here](https://drive.google.com/file/d/1bYdZdr3L69kmzUN3vSiqZmLRD7-A3M47/view?usp=drive_link)
**Note: It can take a while to start up.** Check the command prompt/terminal window if you want to know what its doing. After it says "Model Loaded" the Text generation webUI is usually available on its IP address a few seconds later, for you to connect to in your browser. #### 🟩 Other installation notes
On first startup, AllTalk will download the Coqui XTTSv2 2.0.2 model to its **models** folder (1.8GB space required). Check the command prompt/terminal window if you want to know what its doing. After it says "Model Loaded" the Text generation webUI is usually available on its IP address a few seconds later, for you to connect to in your browser.
**Documentation:** Click on the link when inside Text generation webUI as shown in the screenshot [here](https://github.com/erew123/alltalk_tts#screenshots)
**Where to find voices** https://aiartes.com/voiceai or https://commons.wikimedia.org/ or interviews on youtube etc. Instructions on how to cut down and prepare a voice sample are within the built in documentation.
### 🟩 Other installation notes
On first startup, AllTalk will download the Coqui XTTSv2 2.0.2 model to its **models** folder (1.8GB space required). You can customse your model or use the TTS latest model within the interface (details in documentation).
Once the extension is loaded, please find all documentation and settings on the link provided in the interface (as shown in the screenshot below). Once the extension is loaded, please find all documentation and settings on the link provided in the interface (as shown in the screenshot below).
To start AllTalk every Text generation webUI loads, edit the Text generation webUI `CMD_FLAGS.txt` file in the main `text-generation-webui` folder and add `--extensions alltalk_tts`. **Where to find voices** https://aiartes.com/voiceai or https://commons.wikimedia.org/ or interviews on youtube etc. Instructions on how to cut down and prepare a voice sample are within the built in documentation.
### 🟪 Updating #### 🟩 The one thing I cant easily work around
Narrator function specific - With a RP chat with your AI, **on your character card** `parameters menu` > `character tab` > `greeting` make sure that anything in there that is the **narrator is in asterisks** and anything **spoken is in double quotes**, then hit the `save` (💾) button. Greeting paragraphs/sentences are handled differently from how the AI sends text and so its difficut to account for them both.
I could force a delimeter in at this stage, but I know it would/may affect things further down the line in the chat and I need a good think about that before just making a change. This issue **only** affects the greeting card/start of conversation and the "example" card that comes with text-generation-webui suffers this issue (if you want to try it for yourself). So you would put double quotes around like this (from the example card):
`"`*Hey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers. I'm sure you have a wealth of knowledge that I can learn from.*`"`
## 🟪 Updating
This is pretty much a repeat of the installation process. This is pretty much a repeat of the installation process.
1) In a command prompt/terminal window you need to move into your Text generation webUI folder:<br><br> 1) In a command prompt/terminal window you need to move into your Text generation webUI folder:<br><br>
@@ -93,16 +85,27 @@ This is pretty much a repeat of the installation process.
*Nvidia graphics card machines* - `pip install -r requirements_nvidia.txt`<br><br> *Nvidia graphics card machines* - `pip install -r requirements_nvidia.txt`<br><br>
*Other machines (mac, amd etc)* - `pip install -r requirements_other.txt` *Other machines (mac, amd etc)* - `pip install -r requirements_other.txt`
#### 🟪 **git pull error** #### 🟪 Updating "git pull" error
<details>
<summary>Click to expand</summary><br>
I did leave a mistake in the `/extensions/alltalk_tts/.gitignore` file at one point. If your `git pull` doesnt work, you can either follow the Problems Updating section below, or edit the `.gitignore` file and **replace its entire contents** with the below, save the file, then re-try the `git pull`<br><br> I did leave a mistake in the `/extensions/alltalk_tts/.gitignore` file at one point. If your `git pull` doesnt work, you can either follow the Problems Updating section below, or edit the `.gitignore` file and **replace its entire contents** with the below, save the file, then re-try the `git pull`<br><br>
``` ```
voices/*.* voices/*.*
models/*.* models/*.*
outputs/*.* outputs/*.*
config.json config.json
confignew.json
models.json models.json
diagnostics.log
``` ```
### 🟪 Problems Updating </details>
#### 🟪 Updating other problems
<details>
<summary>Click to expand</summary><br>
If you do experience any problems, the simplest method to resolve this will be: If you do experience any problems, the simplest method to resolve this will be:
@@ -129,6 +132,7 @@ This will download a fresh installation.
You can now start text-generation-webui or AllTalk (standalone) and it should start up fine. You will need to re-set any saved configuration changes on the configuration page. You can now start text-generation-webui or AllTalk (standalone) and it should start up fine. You will need to re-set any saved configuration changes on the configuration page.
Assuming its all working fine and you are happy, you can delete the old alltalk_tts.old folder. Assuming its all working fine and you are happy, you can delete the old alltalk_tts.old folder.
</details>
## 🟫 Screenshots ## 🟫 Screenshots
|![image](https://github.com/erew123/alltalk_tts/assets/35898566/4ca9b4c7-60ce-4ac6-82e5-fd1989b84644) | ![image](https://github.com/erew123/alltalk_tts/assets/35898566/b0e13dba-c6b1-4ab7-845d-244ac1158330) | |![image](https://github.com/erew123/alltalk_tts/assets/35898566/4ca9b4c7-60ce-4ac6-82e5-fd1989b84644) | ![image](https://github.com/erew123/alltalk_tts/assets/35898566/b0e13dba-c6b1-4ab7-845d-244ac1158330) |
@@ -137,91 +141,183 @@ Assuming its all working fine and you are happy, you can delete the old alltalk_
## 🟨 Help with problems ## 🟨 Help with problems
#### 🟨 How to make a diagnostics report file
<details>
<summary>Click to expand</summary>
1) Open a command prompt window, move into your **text-generation-webui** folder, you can now start the Python environment for text-generation-webui:<br><br>
`cmd_windows.bat`, `./cmd_linux.sh`, `cmd_macos.sh` or `cmd_wsl.bat`
2) Move into the **alltalk_tts** folder:<br><br>
`cd extensions` and then `cd alltalk_tts`
3) Run the diagnostics and select the requirements file name you installed AllTalk with:<br><br>
`python diagnostics.py`
4) You will have an on screen output showing your environment setttings, file versions request vs whats installed and details of your graphics card (if Nvidia). This will also create a file called `diagnostics.log` in the `alltalk_tts` folder, that you can upload if you need to create a support ticket on here.<br><br>
![image](https://github.com/erew123/alltalk_tts/assets/35898566/81b9a6e1-c54b-4da0-b85d-3c6fde566d6a)
<br><br></details>
#### 🟨 [AllTalk Startup] Warning TTS Subprocess has NOT started up yet, Will keep trying for 60 seconds maximum. Please wait. It times out after 60 seconds.
<details>
<summary>Click to expand</summary><br>
When the subprocess is starting 2x things are occurring:<br><br>
**A)** Its trying to load the voice model into your graphics card VRAM (assuming you have a Nvidia Graphics card, otherwise its your system RAM)<br>
**B)** Its trying to start up the mini-webserver and send the "ready" signal back to the main process.
**Note:** If you need to create a support ticket, please create a `diagnostics.log` report file to submit with a support request. Details on doing this are above.
Possibilities for this issue are:
1) You are starting AllTalk in both your `CMD FLAG.txt` and `settings.yaml` file. The `CMD FLAG.txt` you would have manually edited and the `settings.yaml` is the one you change and save in the `session` tab of text-generation-webui and you can `Save UI defaults to settings.yaml`. Please only have one of those two starting up AllTalk.
2) You are not starting text-generation-webui with its normal Python environment. Please start it with start_{your OS version} as detailed [here](https://github.com/oobabooga/text-generation-webui#how-to-install) (`start_windows.bat`,`./start_linux.sh`, `start_macos.sh` or `start_wsl.bat`) OR (`cmd_windows.bat`, `./cmd_linux.sh`, `cmd_macos.sh` or `cmd_wsl.bat` and then `python server.py`).
3) You have installed the wrong version of DeepSpeed on your system, for the wrong version of Python/Text-generation-webui. You can go to your text-generation-webui folder in a terminal/command prompt and run the correct cmd version for your OS e.g. (`cmd_windows.bat`, `./cmd_linux.sh`, `cmd_macos.sh` or `cmd_wsl.bat`) and then you can type `pip uninstall deepspeed` then try loading it again. If that works, please see here for the correct instructions for installing DeepSpeed [here](https://github.com/erew123/alltalk_tts#-deepspeed-installation-options).
4) You have an old version of text-generation-webui (pre Dec 2023) I have not tested on older versions of text-generation-webui, so cannot confirm viability on older versions. For instructions on updating the text-generation-webui, please look [here](https://github.com/oobabooga/text-generation-webui#how-to-install) (`update_linux.sh`, `update_windows.bat`, `update_macos.sh`, or `update_wsl.bat`).
5) You already have something running on port 7851 on your computer, so the mini-webserver cant start on that port. You can change this port number by editing the `confignew.json` file and changing `"port_number": "7851"` to `"port_number": "7602"` or any port number you wish that isn’t reserved. Only change the number and save the file, do not change the formatting of the document. This will at least discount that you have something else clashing on the same port number.
6) You have antivirus/firewalling that is blocking that port from being accessed. If you had to do something to allow text-generation-webui through your antivirus/firewall, you will have to do that for this too.
7) You have quite old graphics drivers and may need to update them.
8) Something within text-generation-webui is not playing nicely for some reason. You can go to your text-generation-webui folder in a terminal/command prompt and run the correct cmd version for your OS e.g. (`cmd_windows.bat`, `./cmd_linux.sh`, `cmd_macos.sh` or `cmd_wsl.bat`) and then you can type `python extensions\alltalk_tts\script.py` and see if AllTalk starts up correctly. If it does then something else is interfering.
9) Something else is already loaded into your VRAM or there is a crashed python process. Either check your task manager for erroneous Python processes or restart your machine and try again.
10) You are running DeepSpeed on a Linux machine and although you are starting with `./start_linux.sh` AllTalk is failing there on starting. This is because text-generation-webui will overwrite some environment variables when it loads its python environment. To see if this is the problem, from a terminal go into your text-generation-webui folder and `./cmd_linux.sh` then set your environment variable again e.g. `export CUDA_HOME=/usr/local/cuda` (this may vary depending on your OS, but this is the standard one for Linux, and assuming you have installed the CUDA toolkit), then `python server.py` and see if it starts up. If you want to edit the environment permanently you can do so, I have not managed to write full instructions yet, but here is the conda guide [here](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#set-env-vars).
11) You have built yourself a custom Python environment and something is funky with it. This is very hard to diagnose as its not a standard environment. You may want to updating text-generation-webui and re installing its requirements file (whichever one you use that comes down with text-generation-webui).
</details>
#### 🟨 I activated DeepSpeed in the settings page, but I didnt install DeepSpeed yet and now I have issues starting up #### 🟨 I activated DeepSpeed in the settings page, but I didnt install DeepSpeed yet and now I have issues starting up
<details>
<summary>Click to expand</summary><br>
You can either follow the [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating) and fresh install your config. Or you can edit the `confignew.json` file within the `alltalk_tts` folder. You would look for '"deepspeed_activate": true,' and change the word true to false `"deepspeed_activate": false,' ,then save the file and try starting again. You can either follow the [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating) and fresh install your config. Or you can edit the `confignew.json` file within the `alltalk_tts` folder. You would look for '"deepspeed_activate": true,' and change the word true to false `"deepspeed_activate": false,' ,then save the file and try starting again.<br><br>
If you want to use DeepSpeed, you need an Nvidia Graphics card and to install DeepSpeed on your system. Instructions are [here](https://github.com/erew123/alltalk_tts?tab=readme-ov-file#deepspeed-installation-options). If you want to use DeepSpeed, you need an Nvidia Graphics card and to install DeepSpeed on your system. Instructions are [here](https://github.com/erew123/alltalk_tts#-deepspeed-installation-options)
</details>
#### 🟨 I am having problems updating/some other issue where it wont start up/Im sure this is a bug
<details>
<summary>Click to expand</summary><br>
Please see [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating). If that doesnt help you can raise an ticket [here](https://github.com/erew123/alltalk_tts/issues). It would be handy to have any log files from the console where your error is being shown. I can only losely support custom built Python environments and give general pointers. Please create a `diagnostics.log` report file to submit with a support request.<br><br>
Also, is your text-generation-webui up to date? [instructions here](https://github.com/oobabooga/text-generation-webui?tab=readme-ov-file#how-to-install)
</details>
#### 🟨 I am having problems getting AllTalk to start after changing settings or making a custom setup/model setup. #### 🟨 I am having problems getting AllTalk to start after changing settings or making a custom setup/model setup.
<details>
<summary>Click to expand</summary><br>
I would suggest following [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating) and if you still have issues after that, you can raise an issue [here](https://github.com/erew123/alltalk_tts/issues) I would suggest following [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating) and if you still have issues after that, you can raise an issue [here](https://github.com/erew123/alltalk_tts/issues)
</details>
#### 🟨 I see some red "asyncio" messages #### 🟨 I see some red "asyncio" messages
<details>
<summary>Click to expand</summary><br>
As far as I am aware, these are to do with the chrome browser the gradio text-generation-webui in some way. I raised an issue about this on the text-generation-webui [here](https://github.com/oobabooga/text-generation-webui/issues/4788) where you can see that AllTalk is not loaded and the messages persist. Either way, this is more a warning than an actual issue, so shouldnt affect any functionality of either AllTalk or text-generation-webui, they are more just an annoyance. As far as I am aware, these are to do with the chrome browser the gradio text-generation-webui in some way. I raised an issue about this on the text-generation-webui [here](https://github.com/oobabooga/text-generation-webui/issues/4788) where you can see that AllTalk is not loaded and the messages persist. Either way, this is more a warning than an actual issue, so shouldnt affect any functionality of either AllTalk or text-generation-webui, they are more just an annoyance.
</details>
#### 🟨 I am having problems updating/some other issue where it wont start up/Im sure this is a bug
Please see [Problems Updating](https://github.com/erew123/alltalk_tts#-problems-updating). If that doesnt help you can raise an ticket [here](https://github.com/erew123/alltalk_tts/issues). It would be handy to have any log files from the console where your error is being shown. I can only losely support custom built Python environments and give general pointers.
Also, is your text-generation-webui up to date? [instructions here](https://github.com/oobabooga/text-generation-webui?tab=readme-ov-file#how-to-install)
## 🔵🟢🟡 DeepSpeed Installation Options ## 🔵🟢🟡 DeepSpeed Installation Options
### 🔵 For Linux #### 🔵 Linux Installation
<details>
<summary>Click to expand: Linux DeepSpeed installation</summary>
➡️DeepSpeed requires an Nvidia Graphics card!⬅️ ➡️DeepSpeed requires an Nvidia Graphics card!⬅️
Covered in the online/buit-in documentation, but a nice easy install. 1) Preferably use your built in package manager to install CUDA tools. Alternatively download and install the Nvidia Cuda Toolkit for Linux [Nvidia Cuda Toolkit 11.8 or 12.1](https://developer.nvidia.com/cuda-toolkit-archive)<br><br>
2) Open a terminal console.<br><br>
3) Install libaio-dev (however your Linux version installs things) e.g. `sudo apt install libaio-dev`<br><br>
4) Move into your Text generation webUI folder e.g. `cd text-generation-webui`<br><br>
5) Start the Text generation webUI Python environment `./cmd_linux.sh`<br><br>
6) Text generation webUI **overwrites** the **CUDA_HOME** environment variable each time you `./cmd_linux.sh` or `./start_linux.sh`, so you will need to either permanently change within the python environment OR set CUDA_HOME it each time you `./cmd_linux.sh`. Details to change it each time are on the next step. Below is a link to Conda's manual and changing environment variables permanently though its possible changing it permanently could affect other extensions, you would have to test.<br> <br>
[Conda manual - Environment variables](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#set-env-vars)<br><br>
7) You can temporarily set the **CUDA_HOME** environment with (Standard paths on Ubuntu, but could vary on other Linux flavours):<br><br>
`export CUDA_HOME=/etc/alternatives/cuda`<br><br>
**every** time you run `./cmd_linux.sh`.<br> <br>
If you try to start DeepSpeed with the CUDA_HOME path set incorrectly, expect an error similar to `[Errno 2] No such file or directory: /home/yourname/text-generation-webui/installer_files/env/bin/nvcc`<br> <br>
9) Now install deepspeed with pip install deepspeed<br><br>
10) You can now start Text generation webUI `python server.py` ensuring to activate your extensions.<br><br>
Just to reiterate, starting Text-generation-webUI with `./start_linux.sh` will overwrite the CUDA_HOME variable unless you have permanently changed it, hence always starting it with `./cmd_linux.sh` **then** setting the environment variable manually (step 7) and **then** `python server.py`, which is how you would need to run it each time, unless you permanently set the environment variable for CUDA_HOME within Text-generation-webUI's standard Python environment.
<br><br>
**Removal** - If it became necessary to uninstall DeepSpeed, you can do so with `./cmd_linux.sh` and then `pip uninstall deepspeed`<br><br>
</details>
### 🟢🟡 For Windows & Python 3.11.x or 3.10.x #### 🟢🟡 Windows Installation
DeepSpeed v11.1 and v11.2 will work on the current text-generation-webui Python 3.11 environment! You have 2x options for how to setup DeepSpeed on Windows. A quick way (🟢Option 1) and a long way (🟡Option 2). DeepSpeed v11.2 will work on the current default text-generation-webui Python 3.11 environment! You have 2x options for how to setup DeepSpeed on Windows. A quick way (🟢Option 1) and a long way (🟡Option 2).
Thanks to [@S95Sedan](https://github.com/S95Sedan) - They managed to get DeepSpeed 11.2 working on Windows via making some edits to the original Microsoft DeepSpeed v11.2 installation. The original post is [here](https://github.com/oobabooga/text-generation-webui/issues/4734#issuecomment-1843984142). Thanks to [@S95Sedan](https://github.com/S95Sedan) - They managed to get DeepSpeed 11.2 working on Windows via making some edits to the original Microsoft DeepSpeed v11.2 installation. The original post is [here](https://github.com/oobabooga/text-generation-webui/issues/4734#issuecomment-1843984142).
#### 🟢 OPTION 1 - Quick and easy! #### 🟢 OPTION 1 - Quick and easy!
#### Pre-Compiled Wheel Deepspeed v11.1 (for Windows and Python 3.11) <details>
➡️DeepSpeed requires an Nvidia Graphics card!⬅️ <summary>Click to expand: Pre-Compiled Wheel Deepspeed v11.2 (Python 3.11 and 3.10)</summary>
➡️DeepSpeed requires an Nvidia Graphics card!⬅️<br>
**Note:** In my tests, with this method you will **not** need to install the Nvidia CUDA toolkit to make this work, but AllTalk may warn you when starting DeepSpeed that it doesnt see the CUDA Toolkit, however, it works fine for TTS purposes.
1) Download the correct wheel version for your Python/Cuda from [here](https://github.com/erew123/alltalk_tts/releases/tag/deepspeed) and save the file it inside your **text-generation-webui** folder. 1) Download the correct wheel version for your Python/Cuda from [here](https://github.com/erew123/alltalk_tts/releases/tag/deepspeed) and save the file it inside your **text-generation-webui** folder.
2) Open a command prompt window, move into your **text-generation-webui folder**, you can now start the Python environment for text-generation-webui:<br><br> 2) Open a command prompt window, move into your **text-generation-webui folder**, you can now start the Python environment for text-generation-webui:<br><br>
`cmd_windows.bat` `cmd_windows.bat`
3) With the file that you saved in the **text-generation-webui folder** you now type the following:<br><br> 3) With the file that you saved in the **text-generation-webui folder** you now type the following, replacing YOUR-VERSION with the name of the file you have:<br><br>
`pip install "deepspeed-0.11.1+e9503fe-cp311-cp311-win_amd64.whl"` `pip install "deepspeed-0.11.2+YOUR-VERSION-win_amd64.whl"`
5) This should install through cleanly and you should now have DeepSpeed v11.1 installed within the Python 3.11 environment of text-generation-webui. 5) This should install through cleanly and you should now have DeepSpeed v11.2 installed within the Python 3.11/3.10 environment of text-generation-webui.
6) When you start up text-generation-webui, and AllTalk starts, you should see **[AllTalk Startup] DeepSpeed Detected** 6) When you start up text-generation-webui, and AllTalk starts, you should see **[AllTalk Startup] DeepSpeed Detected**
7) Within AllTalk, you will now have a checkbox for **Activate DeepSpeed** though remember you can only change **1x setting every 15 or so seconds**, so dont try to activate DeepSpeed **and** LowVRAM/Change your model simultantiously. Do one of those, wait 15-20 seconds until the change is confirmed in the terminal/command prompt, then you can change the other. When you are happy it works, you can set the default start-up settings in the settings page. 7) Within AllTalk, you will now have a checkbox for **Activate DeepSpeed** though remember you can only change **1x setting every 15 or so seconds**, so dont try to activate DeepSpeed **and** LowVRAM/Change your model simultantiously. Do one of those, wait 15-20 seconds until the change is confirmed in the terminal/command prompt, then you can change the other. When you are happy it works, you can set the default start-up settings in the settings page.
<br><br>
**Removal** - If it became necessary to uninstall DeepSpeed, you can do so with `cmd_windows.bat` and then `pip uninstall deepspeed`<br><br>
</details>
#### 🟡 OPTION 2 - A bit more complicated! #### 🟡 OPTION 2 - A bit more complicated!
#### Manual Build DeepSpeed v11.2 (for Windows and Python 3.11) <details>
➡️DeepSpeed requires an Nvidia Graphics card!⬅️ <summary>Click to expand: Manual Build DeepSpeed v11.2 (Python 3.11 and 3.10)</summary>
➡️DeepSpeed requires an Nvidia Graphics card!⬅️<br><br>
DeepSpeed Version 11.2 with CUDA 11.8 or 12.1 - Installation Instructions: This will take about 1 hour to complete and about 6GB of disk space.<br>
1. Download the 11.2 release of [DeepSpeed](https://github.com/microsoft/DeepSpeed/releases/tag/v0.11.2) extract it to a folder. 1. Download the 11.2 release of [DeepSpeed](https://github.com/microsoft/DeepSpeed/releases/tag/v0.11.2) extract it to a folder.
2. Install Visual C++ build tools, such as [VS2019 C++ x64/x86](https://learn.microsoft.com/en-us/visualstudio/releases/2019/redistribution#vs2019-download) build tools. 2. Install Visual C++ build tools, such as [VS2019 C++ x64/x86](https://learn.microsoft.com/en-us/visualstudio/releases/2019/redistribution#vs2019-download) build tools.
3. Download and install the [Nvidia Cuda Toolkit 11.8 or 12.1](https://developer.nvidia.com/cuda-toolkit-archive) 3. Download and install the [Nvidia Cuda Toolkit 11.8 or 12.1](https://developer.nvidia.com/cuda-toolkit-archive)
4. OPTIONAL If you do not have an python environment already created, you can install [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html), then at a command prompt, create and activate your environment with:<br><br> 4. **OPTIONAL** If you do not have an python environment already created and you are **not** going to use Text-generation-webui's environment, you can install [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html), then at a command prompt, create and activate your environment with:<br><br>
```conda create -n pythonenv python=3.11```<br> ```conda create -n pythonenv python=3.11```<br>
```activate pythonenv```<br><br> ```activate pythonenv```<br>
If you are using the **text-generation-webui** python environment, then in the `text-generation-webui` folder you will run `cmd_windows.bat` to start the python evnironment.<br>
5. Launch the Command Prompt cmd with Administrator privilege as it requires admin to allow creating symlink folders. 5. Launch the Command Prompt cmd with Administrator privilege as it requires admin to allow creating symlink folders.
6. Install PyTorch, 2.1.0 with CUDA 12.1 into your Python 3.11 environment e.g:<br><br> 6. If you are using the **Text-generation-webui** python environment, then in the `text-generation-webui` folder you will run `cmd_windows.bat` to start the python evnironment.<br><br>
Otherwise Install PyTorch, 2.1.0 with CUDA 11.8 or 12.1 into your Python 3.1x.x environment e.g:<br><br>
```activate pythonenv``` (activate your python environment)<br> ```activate pythonenv``` (activate your python environment)<br>
```conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia```<br> ```conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia```<br>
or<br> or<br>
```conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia```<br> ```conda install pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia```<br>
7. Edit your Windows environment variables to ensure that CUDA_HOME and CUDA_PATH are set to your Nvidia Cuda Toolkit path. (The folder above the bin folder that nvcc.exe is installed in). Examples are:<br><br>
9. Set your CUDA Windows environment variables in the command prompt to ensure that CUDA_HOME and CUDA_PATH are set to your Nvidia Cuda Toolkit path. (The folder above the bin folder that nvcc.exe is installed in). Examples are:<br><br>
```set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1```<br> ```set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1```<br>
```set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1```<br> ```set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1```<br>
rr<br> or<br>
```set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8```<br> ```set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8```<br>
```set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8```<br> ```set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8```<br>
8. Navigate to your deepspeed folder in the Command Prompt:<br><br> 10. Navigate to wherever you extracted the deepspeed folder in the Command Prompt:<br><br>
```cd c:\deepspeed``` (wherever you extracted it to) ```cd c:\DeepSpeed-0.11.2``` (wherever you extracted it to)
9. Modify the following files:<br> 11. Modify the following files:<br>
**(These modified files are included in the git-pull of AllTalk, in the DeepSpeed Windows folder but if you want to modify them yourself, please follow the below)**<br> **(These modified files are included in the git-pull of AllTalk, in the DeepSpeed Windows folder and so can just be copied over the top of the exsting folders/files, but if you want to modify them yourself, please follow the below)**<br>
deepspeed-0.11.2/build_win.bat** - at the top of the file, add:<br><br> deepspeed-0.11.2/build_win.bat - at the top of the file, add:<br><br>
```set DS_BUILD_EVOFORMER_ATTN=0``` ```set DS_BUILD_EVOFORMER_ATTN=0```
deepspeed-0.11.2/csrc/quantization/pt_binding.cpp - lines 244-250 - change to: deepspeed-0.11.2/csrc/quantization/pt_binding.cpp - lines 244-250 - change to:
@@ -281,6 +377,9 @@ def get_shm_size():
```build_win.bat``` and wait 10-20 minutes. ```build_win.bat``` and wait 10-20 minutes.
11. Now `cd dist` to go into your dist folder and you can now `pip install deepspeed-YOURFILENAME.whl` (or whatever your WHL file is called). 11. Now `cd dist` to go into your dist folder and you can now `pip install deepspeed-YOURFILENAME.whl` (or whatever your WHL file is called).
<br><br>
**Removal** - If it became necessary to uninstall DeepSpeed, you can do so with `cmd_windows.bat` and then `pip uninstall deepspeed`<br><br>
</details>
### 🔴 Future to-do list ### 🔴 Future to-do list
- Complete & document the new/full standalone mode API. - Complete & document the new/full standalone mode API.
+199
View File
@@ -0,0 +1,199 @@
try:
import platform
import subprocess
import logging
from importlib_metadata import distributions
import torch
import os # Import the os module
import re
import glob
import textwrap
import packaging.version
import packaging.specifiers
from packaging.specifiers import SpecifierSet
from packaging.specifiers import SpecifierSet
from packaging.version import parse as parse_version
except ImportError as e:
print(f"\033[91mError importing module: {e}\033[0m\n")
print("\033[94mPlease ensure you started the Text-generation-webUI Python environment with either\033[0m")
print("\033[92mcmd_linux.sh\033[0m, \033[92mcmd_windows.bat\033[0m, \033[92mcmd_macos.sh\033[0m, or \033[92mcmd_wsl.bat\033[0m")
print("\033[94mand then try running the diagnostics again.\033[0m")
exit(1)
try:
import psutil
except ImportError:
print("psutil not found. Installing...")
subprocess.run(['pip', 'install', 'psutil'])
import psutil
def get_requirements_file():
requirements_files = glob.glob("requirements*.txt")
if not requirements_files:
print("\033[91mNo requirements files found.\033[0m")
return None
print("\033[94m\nSelect a requirements file to check against (or press Enter for default 'requirements.txt'):\033[0m\n")
for i, file in enumerate(requirements_files, start=1):
print(f"{i}. {file}")
choice = input("\nEnter the number of your choice: ")
try:
choice = int(choice) - 1
return requirements_files[choice]
except (ValueError, IndexError):
return "requirements.txt"
# Set up logging with filemode='w'
logging.basicConfig(filename='diagnostics.log', filemode='w', level=logging.INFO)
# Function to get GPU information using subprocess
def get_gpu_info():
try:
result = subprocess.run(['nvidia-smi'], stdout=subprocess.PIPE, text=True)
return result.stdout
except FileNotFoundError:
return "NVIDIA GPU information not available"
# Function to check if a port is in use
def is_port_in_use(port):
for conn in psutil.net_connections():
if conn.laddr.port == port:
return True
return False
def satisfies_wildcard(installed_version, required_version):
if '*' in required_version:
required_parts = required_version.split('.')
installed_parts = installed_version.split('.')
for req, inst in zip(required_parts, installed_parts):
if req != '*' and req != inst:
return False
return True
return False
# Function to log and print system information
def log_system_info():
# System information
os_version = platform.system() + " " + platform.version()
# Get CUDA_HOME environment variable
cuda_home = os.environ.get('CUDA_HOME', 'N/A')
gpu_info = get_gpu_info()
# Python environment information
python_version = platform.python_version()
# Torch version
torch_version = torch.__version__
# System RAM using psutil
try:
virtual_memory = psutil.virtual_memory()
total_ram = f"{virtual_memory.total / (1024 ** 3):.2f} GB"
available_ram = f"{virtual_memory.available / (1024 ** 3):.2f} GB"
system_ram = f"{available_ram} available out of {total_ram} total"
except NameError:
print("psutil is not installed. Unable to check system RAM.")
system_ram = "N/A"
# Port check (if psutil is available)
port_status = "N/A"
if 'psutil' in globals():
port_to_check = 7851
if is_port_in_use(port_to_check):
port_status = f"Port {port_to_check} is in use."
else:
port_status = f"Port {port_to_check} is available."
# Package versions using importlib_metadata
package_versions = {d.metadata['Name']: d.version for d in distributions()}
# Compare with requirements file
requirements_file = get_requirements_file()
if requirements_file:
required_packages = {}
installed_packages = {}
try:
with open(requirements_file, 'r') as req_file:
requirements = [line.strip() for line in req_file]
for req in requirements:
# Use regular expression to parse package name and version
match = re.match(r'([^\s>=]+)\s*([>=<]+)\s*([^,]+)', req)
if match:
package_name, operator, version_spec = match.groups()
installed_version = package_versions.get(package_name, 'Not installed')
if installed_version != 'Not installed':
required_packages[package_name] = (operator, version_spec)
installed_packages[package_name] = installed_version
except FileNotFoundError:
print(f"\n{requirements_file} not found. Skipping version checks.")
logging.info(f"NOTE {requirements_file} not found. Skipping version checks.")
# Log and print information
logging.info(f"OS Version: {os_version}")
logging.info(f"Note: Windows 11 build is 10.x.22xxx")
logging.info(f"Python Version: {python_version}")
logging.info(f"Torch Version: {torch_version}")
logging.info(f"System RAM: {system_ram}")
logging.info(f"CUDA_HOME: {cuda_home}")
logging.info(f"Port Status: {port_status}")
if required_packages: # Check if the dictionary is not empty
logging.info("Package Versions:")
max_package_length = max(len(package) for package in required_packages.keys())
for package_name, (operator, required_version) in required_packages.items():
installed_version = installed_packages.get(package_name, 'Not installed')
logging.info(f"{package_name.ljust(max_package_length)} Required: {operator} {required_version.ljust(12)} Installed: {installed_version}")
logging.info(f"GPU Information:\n{gpu_info}")
logging.info("Package Versions:")
for package, version in package_versions.items():
logging.info(f"{package}>= {version}")
# Print to screen
print(f"\n\033[94mOS Version:\033[0m \033[92m{os_version}\033[0m")
print(f"\033[94mOS Ver note:\033[0m \033[92mWindows 11 build is 10.x.22xxx\033[0m")
print(f"\033[94mCUDA_HOME:\033[0m \033[92m{cuda_home}\033[0m")
print(f"\033[94mSystem RAM:\033[0m \033[92m{system_ram}\033[0m")
print(f"\033[94mPort Status:\033[0m \033[92m{port_status}\033[0m")
print(f"\033[94mTorch Version:\033[0m \033[92m{torch_version}\033[0m")
print(f"\033[94mPython Version:\033[0m \033[92m{python_version}\033[0m")
if required_packages: # Check if the dictionary is not empty
print("\033[94m\nRequirements file package comparison:\033[0m")
max_package_length = max(len(package) for package in required_packages.keys())
for package_name, (operator, required_version) in required_packages.items():
installed_version = installed_packages.get(package_name, 'Not installed')
# Exclude build information (e.g., +cu118) before creating the SpecifierSet
required_version_no_build = required_version.split("+")[0]
if '*' in required_version:
condition_met = satisfies_wildcard(installed_version, required_version)
else:
# Compare versions using packaging.version
required_specifier = SpecifierSet(f"{operator}{required_version_no_build}")
installed_version = parse_version(installed_version)
condition_met = installed_version in required_specifier
color_required = "\033[92m" if condition_met else "\033[91m"
color_installed = "\033[92m" if condition_met else "\033[91m"
# Print colored output
print(f"{package_name.ljust(max_package_length)} Required: {color_required}{operator} {required_version.ljust(12)}\033[0m Installed: {color_installed}{installed_version}\033[0m")
print("\033[94m\nRequirements file specifier meanings:\033[0m")
explanation = textwrap.dedent("""
== Exact version != Any version except < Less than
<= Less than or equal to > Greater than >= Greater than or equal to
~ Compatible release ; Environment marker AND Logical AND
OR Logical OR
""")
print(explanation.strip())
print("")
print(f"GPU Information:{gpu_info}")
print(f"\033[94mDiagnostic log created:\033[0m \033[92mdiagnostics.log\033[0m")
print(f"\033[94mPlease upload the log file with any support ticket.\033[0m")
if __name__ == "__main__":
log_system_info()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 KiB

After

Width:  |  Height:  |  Size: 547 KiB

+450 -380
View File
@@ -641,27 +641,25 @@ simple_webpage = """
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
} }
h1, h2, h3, h4, h5 { h1, h2 {
color: #333; color: black;
}
h1, h2, h3 {
text-decoration: underline; text-decoration: underline;
} }
p, span { p, span {
color: #555; color: #555;
font-size: 16px; /* Increased font size for better readability */ font-size: 16px; /* Increased font size for better readability */
line-height: 1.5; /* Adjusted line-height for better spacing */ margin-top: 0; /* Remove top margin for paragraphs */
} }
code { code {
background-color: #f8f8f8; background-color: #f8f8f8;
border: 1px solid #ddd; border: 2px solid #ddd;
border-radius: 4px; border-radius: 4px;
padding: 2px 2px; padding: 0px 0px;
font-size: 14px; /* Adjusted font size for better visibility */ font-size: 14px;
margin-bottom: 0px; margin-bottom: 20px;
color: #3366ff;
} }
pre { pre {
@@ -671,13 +669,11 @@ simple_webpage = """
padding: 10px; padding: 10px;
overflow-x: auto; overflow-x: auto;
font-size: 14px; /* Adjusted font size for better visibility */ font-size: 14px; /* Adjusted font size for better visibility */
line-height: 1.5; /* Adjusted line-height for better spacing */
} }
ul { ul {
color: #555; color: #555;
list-style-type: square; /* Set the bullet style */ list-style-type: square; /* Set the bullet style */
line-height: 1.5; /* Adjusted line-height for better spacing */
margin-left: 2px; /* Adjust the left margin to create an indent */ margin-left: 2px; /* Adjust the left margin to create an indent */
} }
@@ -778,265 +774,82 @@ simple_webpage = """
display: none; display: none;
} }
table {
border-collapse: collapse;
width: 100%;
margin-bottom: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
/* Style for the first table */
#configuration-details table {
font-size: 16px;
}
/* Style for the nested table */
#modeldownload-table table {
font-size: 16px;
}
#modeldownload-table table td {
padding: 4px; /* Adjust padding as needed for the nested table */
}
</style> </style>
</head> </head>
<body> <body>
<h1 id="toc">AllTalk TTS for Text generation webUI</h1> <h1 id="toc">AllTalk TTS for Text generation webUI</h1>
<p><b>Text generation webUI</b> webpage <a href="http://{{ params["ip_address"] }}:7860" target="_blank">here</a> and documentation <a href="https://github.com/oobabooga/text-generation-webui/wiki" target="_blank">here</a></p> <iframe src="http://{{ params["ip_address"] }}:{{ params["port_number"] }}/settings" width="100%" height="500" frameborder="0" style="margin: 0; padding: 0;"></iframe>
<p><b>AllTalk Github</b> <a href="https://github.com/erew123/alltalk_tts" target="_blank">here</a> <h2>Table of Contents</h2>
<ul>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#server-information">Server Information</a></li>
<li><a href="#demotesttts">Demo/Test TTS output</a></li>
<li><a href="#using-voice-samples">Using Voice Samples</a></li>
<li><a href="#text-not-inside">Text Not inside</a></li>
<li><a href="#low-vram">Low VRAM</a></li>
<li><a href="#deepspeed">DeepSpeed</a>
<ul>
<li><a href="#deepspeed-linux">DeepSpeed Setup Linux</a></li>
<li><a href="#deepspeed-windows">DeepSpeed Setup Windows</a></li>
</ul>
</li>
<li><a href="#TTSmodels">TTS Models/Methods</a></li>
<li><a href="#temperature-and-repetition-settings">Model temperature and repetition settings</a></li>
<li><a href="#start--up-checks">Start-up checks</a></li>
<li><a href="#customTTSmodels">Custom TTS Models and Model path</a></li>
<li><a href="#configuration-details">Configuration file settings</a></li>
<li><a href="#curl-commands">JSON calls and CURL Commands</a></li>
<li><a href="#debugging-and-tts-generation-information">Debugging and TTS Generation Information</a></li>
<li><a href="#references">Thanks &amp; References</a></li>
</ul>
<iframe src="http://{{ params["ip_address"] }}:{{ params["port_number"] }}/settings" width="100%" height="500" frameborder="0" style="margin: 0; padding: 0;"></iframe> <h2 id="getting-started">Getting Started</h2>
<p style="padding-left: 30px; text-align: justify;">AllTalk is a web interface, based around the Coqui TTS voice cloning/speech generation system. To generate TTS, you can use the provided gradio interface or interact with the server using JSON/CURL commands.&nbsp;</p>
<p style="padding-left: 30px; text-align: justify;"><span style="color: #ff0000;">Note:</span> When loading up a new character in Text generation webUI it may look like nothing is happening for 20-30 seconds. Its 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 TTS engine to keep re-generating the text, so please just wait and check the console if needed.</p>
<p style="padding-left: 30px; text-align: justify;"><span style="color: #ff0000;">Note: </span>Ensure that your RP character card has asterisks around anything for the narration and double quotes around anything spoken. There is a complication ONLY with the greeting card so, ensuring it has the correct use of quotes and asterisks will help make sure that the greeting card sounds correct. I will aim to address this issue in a future update. In Text-generation-webUI <span style="color: #3366ff;">parameters menu</span> &gt; <span style="color: #3366ff;">character tab</span> &gt; <span style="color: #3366ff;">greeting</span>&nbsp;make sure that anything in there that is the narrator is in asterisks and anything spoken is in double quotes, then hit the <span style="color: #3366ff;">save</span> (💾) button.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>AllTalk</strong></span> <br />Github <a href="https://github.com/erew123/alltalk_tts" target="_blank" rel="noopener">link here</a><br />Update instructions <a href="https://github.com/erew123/alltalk_tts?#-updating" target="_blank" rel="noopener">link here</a><br />Help and issues <a href="https://github.com/erew123/alltalk_tts?#-help-with-problems" target="_blank" rel="noopener">link here<br /><br /></a><span style="text-decoration: underline;"><strong>Text generation webUI</strong></span> <br />Web interface&nbsp;<a href="http://{{ params["ip_address"] }}:7860" target="_blank" rel="noopener">link here</a> <br />Documentation <a href="https://github.com/oobabooga/text-generation-webui/wiki" target="_blank" rel="noopener">link here</a></p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<h2 id="server-information">Server Information</h2>
<ul>
<h3>Table of Contents</h3>
<ul>
<li><a href="#getting-started">Getting Started with AllTalk TTS</a></li>
<li><a href="#server-information">Server Information</a></li>
<li><a href="#using-voice-samples">Using Voice Samples</a></li>
<li><a href="#text-not-inside">Text Not inside function</a></li>
<li><a href="#local-model-temperature-and-repetition-settings">Local Model temperature and repetition settings</a></li>
<li><a href="#where-are-the-outputs-stored">Automatic output wav file deletion</a></li>
<li><a href="#low-vram-option-overview">Low VRAM Overview</a></li>
<li><a href="#deepspeed-simplified">DeepSpeed Simplified</a></li>
<li><a href="#setup_deepspeed">Setup DeepSpeed</a></li>
<li><a href="#other-features">Other Features of AllTalk_TTS Extension for Text generation webUI</a></li>
<li><a href="#TTSmodels">TTS Models/Methods</a></li>
<li><a href="#customTTSmodels">Custom TTS Models and Model path</a></li>
<li><a href="#demotesttts">Demo/Test TTS output</a></li>
<li><a href="#curl-commands">CURL Commands</a></li>
<li><a href="#configuration-details">Configuration Details</a></li>
<li><a href="#debugging-and-tts-generation-information">Debugging and TTS Generation Information</a></li>
<li><a href="#references">Thanks & References</a></li>
</ul>
<h2 id="getting-started">Getting Started</h2>
<p>AllTalk is a web interface, based around the Coqui TTS speech generation system. To generate TTS, you can use the provided interface or interact with the server using CURL commands. Below are some details and examples:</p>
<p><b>Note:</b> When loading up a new character in Text generation webUI it may look like nothing is happening for 20-30 seconds. Its actually processing the introduction section 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 TTS engine to keep re-generating the text, so please just wait and check the console if needed. </p>
<p><b>IMPORTANT Note:</b> Ensure that your RP character card has asterisks around anything for the narration and double quotes around anything spoken. There is a complication ONLY with the greeting card so, ensuring it has the correct use of quotes and asterisks will help make sure that the greeting card sounds correct. I will aim to address this issue in a future update.</p>
<p>Details on how to edit your greeting card, and where I'm at with solving this, can be found here <a href="https://github.com/erew123/alltalk_tts/tree/main#the-one-thing-i-cant-easily-work-around" target="_blank">erew123's Github</a> and you can look here at an example of how text should be formatted with quotes and asterisks <a href="#text-not-inside">Text Not inside function</a></p>
<p><b>AllTalk Updating instructions</b> <a href="https://github.com/erew123/alltalk_tts?#-updating" target="_blank">here</a>
<p><b>AllTalk Help and issues</b> <a href="https://github.com/erew123/alltalk_tts?#-help-with-problems" target="_blank">here</a>
<h3 id="server-information">Server Information</h3>
<ul>
<li>Base URL: <code>http://{{ params["ip_address"] }}:{{ params["port_number"] }}</code></li> <li>Base URL: <code>http://{{ params["ip_address"] }}:{{ params["port_number"] }}</code></li>
<li>Server Status: <code><a href="http://{{ params["ip_address"] }}:{{ params["port_number"] }}/ready">http://{{ params["ip_address"] }}:{{ params["port_number"] }}/ready</a></code></li> <li>Server Status: <code><a href="http://{{ params["ip_address"] }}:{{ params["port_number"] }}/ready">http://{{ params["ip_address"] }}:{{ params["port_number"] }}/ready</a></code></li>
</ul>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="using-voice-samples"><strong>Using Voice Samples</strong></h3> </ul>
<h4 id="where-are-the-sample-voices-stored">Where are the sample voices stored?</h4> <p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<p>Voice samples are stored in <b>/extensions/alltalk_tts/voices/</b> and should be named using the following format <b>name.wav</b></p>
<h4 id="where-are-the-outputs-stored">Where are the outputs stored & Automatic output wav file deletion.</h4>
<p>Voice samples are stored in <b>/extensions/alltalk_tts/outputs/</b></p>
<p>You can configure automatic maintenence deletion of old wav files by setting <b>"Del WAV's older than"</b> in the settings above. When <b>"Disabled"</b> your output wav files will be left untouched. When set to a setting <b>"1 Day"</b> or greater, your output wav files older than that time period will be automatically deleted on startup.</p>
<h4>Where are the models stored?</h4>
<p>This extension will download the 2.0.2 model to <b>/extensions/alltalk_tts/models/</b></p>
<p>This TTS engine will also download the latest available model and store it wherever it normally stores it for your OS (Windows/Linux/Mac).</p>
<h4>How do I create a new voice sample?</h4>
<p>To create a new voice sample you need to make a <b>wav</b> file that is <b>22050Hz</b>, <b>Mono</b>, <b>16 bit</b> and between <b>6 to 30 seconds long</b>, though 8 to 10 seconds is usually good enough. The model <b>can handle up to a 30 second sample</b>, however Ive not noticed any improvemnt in voice output from a much shorter clip.</p>
<p>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 on the soundtrack, a low humm, some quiet music playing or something? The better quality the audio the better the result. Dont forget, the AI that processes the sounds can hear everything, all those liitle noises, and it will use them in the voice its trying to recreate. </p>
<p>Try make your clip one of nice flowing speech, like the included example files. No big pauses, gaps or other sounds. Preferably one that the person you are trying to copy will show a little vocal range and emotion in their voice. Also, try to avoid a clip starting or ending with breathy sounds (breathing in/out etc).</p>
<h4>Generating the sample!</h4>
<p>So youve downloaded your favoutie celebrity interview off Youtube or wherever. From here you need to chop it down to 6 to 12 seconds in length and resample it. If you need to clean it up, do audio processing, volume level changes etc, do it before the steps I am about to describe.</p>
<p>Using the latest version of <b>Audacity</b>, select your clip and <b>Tracks > Resample to 22050Hz</b>, then <b>Tracks > Mix > Stereo to Mono</b>. and then <b>File > Export Audio</b>, saving it as a WAV of 22050Hz.</p>
<p>Save your generated wav file in <b>/extensions/alltalk_tts/voices/</b></p>
<p><b>Note:</b> Using AI generated audio clips <b>may</b> introduce unwanted sounds as its already a copy/simulation of a voice.</p>
<h4>Why doesnt it sound like XXX Person?</h4>
<p>The reasons can be that you:</p>
<ul>
<li>Didn't downsample it as above.</li>
<li>Have a bad quality voice sample.</li>
<li>Try using the 3x different generation methods: <b>API TTS</b>, <b>API Local</b>, and <b>XTTSv2 Local</b> within the web interface, as they generate output in different ways and sound different.</li>
</ul>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="text-not-inside"><strong>Text Not inside function</strong></h3>
<p>When using the Narrator function, most AI models should be using asterisks or double quotes to differentiate between the Narrator or the Character, however, many models sometimes switch between using asterisks and double quotes or nothing at all. This leaves a bit of a mess because sometimes that text is narration and sometimes its the character talking and there's no clear way to know where to split sentences. There is no 100&percnt; solution at the moment.</p>
<p>Most models usually lean more way than the other as to it is narration or the character talking when it does this. So you can use the "<b>Text NOT inside of * or &quot; is</b>" function to decide what the TTS engine should do in situations like this. It's an either/or situation. It will either use the Character voice or the narrator voice when text is not inside asterisks or double quotes.</p>
<div style="text-align: center;">
<img src="/static/textnotinside.jpg" alt="When the AI doesnt use an asterisk or a quote">
</div>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="local-model-temperature-and-repetition-settings"><strong>Local Model Temperature and Repetition Settings</strong></h3>
<p><strong>Caution:</strong> It is recommended not to modify these settings unless you fully comprehend their effects. A general overview is provided below for reference.</p>
<p><strong>Note:</strong> Any changes to these two settings won't take effect until you restart AllTalk/Text generation webUI.</p>
<p>These settings only affect <b>API Local</b> and <b>XTTSv2 Local</b> methods.</p>
<h4>Repetition Penalty:</h4>
<p>In the context of text-to-speech (TTS), the <strong>Repetition Penalty</strong> (e.g., "local_repetition_penalty") influences how the model handles the repetition of sounds, phonemes, or intonation patterns. Here's how it works:</p>
<ul>
<li><strong>Higher Repetition Penalty (e.g. 10.0):</strong> The model is less likely to repeat sounds or patterns. It promotes diversity and reduces redundancy in the generated speech. This can result in a more varied and expressive output, introducing elements of unpredictability and creativity.</li>
<li><strong>Lower Repetition Penalty (e.g. 2.0):</strong> The model is more tolerant of repeating sounds or patterns. This might lead to more repetition in the generated speech, potentially making it sound more structured or rhythmically consistent. Lower values can still introduce expressive variations, but to a lesser extent. This tendency means that the generated speech may remain closer to the original sample.</li>
</ul>
<h4>Temperature:</h4>
<p>In the context of text-to-speech (TTS), the <strong>Temperature</strong> (e.g., "local_temperature") influences the randomness of the generated speech. Here's how it affects the output:</p>
<ul>
<li><strong>Higher Temperature (e.g. 0.75):</strong> Increases randomness in how the model selects and pronounces phonemes or intonation patterns. This can result in more creative, but potentially less controlled or "stable," speech that may deviate from the input sample. It adds an element of unpredictability and variety, contributing to expressiveness in the voice output created.</li>
<li><strong>Lower Temperature (e.g. 0.20):</strong> Reduces randomness, making the model more likely to closely mimic the input sample's voice, intonation, and overall style. This tends to produce more "coherent" speech that aligns closely with the characteristics of the training data or input voice sample. It adds a level of predictability and consistency, potentially reducing expressive variations.</li>
</ul>
<h4><strong>Temperature and Repetition Settings Examples:</strong></h4>
<ul>
<li>
<strong>Temp High (e.g. 0.90) and Repetition High (e.g. 10.0):</strong><br>
Result: Speech may sound highly creative and diverse, with reduced repetition. It could be more expressive and unpredictable.
</li>
<li>
<strong>Temp Low (e.g. 0.20) and Repetition High (e.g. 10.0):</strong><br>
Result: Output tends to be focused and deterministic, but with reduced repetition. It may sound structured and less expressive.
</li>
<li>
<strong>Temp High (e.g. 0.90) and Repetition Low (e.g. 2.0):</strong><br>
Result: Speech may be more creative and diverse, with tolerance for repeating sounds. It could have expressive variations but with some structured patterns.
</li>
<li>
<strong>Temp Low (e.g. 0.20) and Repetition Low (e.g. 2.0):</strong><br>
Result: Output is focused and deterministic, with tolerance for repeating sounds. It may sound more structured and less expressive.
</li>
</ul>
<h4>Default Values for XTTSv2 version 2.0.2:</h4>
<p>In the XTTSv2 version 2.0.2 model, the default factory values are:</p>
<ul>
<li><strong>Default Temperature:</strong> "temperature": 0.75 - A balanced value that provides a good trade-off between creativity and stability.</li>
<li><strong>Default Repetition Penalty:</strong> "repetition_penalty": 10.0 - A higher value that encourages diversity and reduces repetition of sounds, contributing to a more expressive output.</li>
</ul>
<p>The temperature has been set at 0.70 here though, as it often produces a slightly better result (in my estimation).</p>
<p>The default settings for any model are usually provided in the confignew.json file that comes wtih the model and this file can be found within the folder where the model is stored.</p>
<p>These default values are carefully chosen to offer a reasonable starting point for users, and adjustments can be made based on individual preferences and use cases. However, it's important to note that changing these settings or setting them to extremes may result in unexpected outcomes. Setting extremely high or low values, especially without a good understanding of their effects, may lead to flat-sounding output or very strange-sounding output. It's advisable to experiment with adjustments incrementally and observe the impact on the generated speech to find a balance that suits your desired outcome.</p>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="low-vram-option-overview"><strong>Low VRAM Overview:</strong></h3>
<p>The Low VRAM option is a crucial feature designed to enhance performance under constrained Video Random Access Memory (VRAM) conditions, as the TTS models require 2GB-3GB of VRAM to run effectively. This feature strategically manages the relocation of the Text-to-Speech (TTS) model between your system's Random Access Memory (RAM) and VRAM, moving it between the two on the fly.</p>
<p>When you dont have enough VRAM free after loading your LLM model into your VRAM (Normal Mode example below), you can see that with so little working space, your GPU will have to swap in and out bits of the TTS model, which causes horrible slowdown.</p>
<p><b>Note: </b>An Nvidia Graphics card is required for LowVRAM, as you will be using system memory for the models otherwise.</p>
<h4>How It Works:</h4>
<p>The Low VRAM mode intelligently orchestrates the relocation of the entire TTS model. When the TTS engine requires VRAM for processing, the entire model seamlessly moves into VRAM, causing your LLM to unload/displace some layers, ensuring optimal performance of the TTS engine.</p>
<p>The TTS model is fully loaded into VRAM, facilitating uninterrupted and efficient TTS generation, creating contiguous space for the TTS model and significantly accelerating TTS processing, especially for long paragraphs. Post-TTS processing, the model promptly moves back to RAM, freeing up VRAM space for your Language Model (LLM) to load back in the missing layers. This adds about 1-2 seconds to both text generation by the LLM and the TTS engine.</p>
<p>By transferring the entire model between RAM and VRAM, the Low VRAM option avoids fragmentation, ensuring the TTS model remains cohesive and accessible.</p>
<p>This creates a TTS generation performance Boost for Low VRAM Users and is particularly beneficial for users with less than 2GB of free VRAM after loading their LLM, delivering a substantial 5-10x improvement in TTS generation speed.</p>
<div style="text-align: center;">
<img src="/static/lowvrammode.png" alt="How Low VRAM Works">
</div>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="deepspeed-simplified"><strong>DeepSpeed Simplified:</strong></h3>
<h4>What's DeepSpeed?</h4>
<p>DeepSpeed, developed by Microsoft, is like a speed boost for Text-to-Speech (TTS) tasks. It's all about making TTS happen faster and more efficiently.</p>
<p><b>Note: </b>An Nvidia Graphics card is required for DeepSpeed</p>
<h4>How Does It Speed Things Up?</h5>
<ul>
<li><strong>Model Parallelism:</strong> Spreads the work across multiple GPUs, making TTS models handle tasks more efficiently.</li>
<li><strong>Memory Magic:</strong> Optimizes how memory is used, reducing the memory needed for large TTS models.</li>
<li><strong>Efficient Everything:</strong> DeepSpeed streamlines both training and generating speech from text, making the whole process quicker.</li>
</ul>
<h4>Why Use DeepSpeed for TTS?</h4>
<ul>
<li><strong>2x-3x Speed Boost:</strong> Generates speech much faster than usual.</li>
<li><strong>Handles More Load:</strong> Scales up to handle larger workloads with improved performance.</li>
<li><strong>Smart Resource Use:</strong> Uses your computer's resources smartly, getting the most out of your hardware.</li>
</ul>
<div style="text-align: center;">
<img src="/static/deepspeedexample.jpg" alt="DeepSpeed on vs off">
</div>
<p><strong>Note:</strong> DeepSpeed only works with the XTTSv2 Local model.</p>
<p><strong>Note:</strong> Requires Nvidia Cuda Toolkit installation and correct CUDA_HOME path configuration.</p>
<h4>How to Use It:</h4>
<p>In AllTalkTTS, the DeepSpeed checkbox will only be available if DeepSpeed is detected on your system. Check the checkbox, wait 10 to 30 seconds and off you go!</p>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="setup_deepspeed">Setup DeepSpeed</h3>
<p><strong>Note:</strong> DeepSpeed/AllTalk may warn if the Nvidia Cuda Toolkit and CUDA_HOME environment variables arent set. On Linux I believe you need these installed, on Windows, if you use the pre-built wheel it seems ok without.</p>
<h4>Linux - DeepSpeed - Installation Instructions</h4>
<ol>
<li>Download and install the <a href="https://developer.nvidia.com/cuda-toolkit-archive">Nvidia Cuda Toolkit for Linux</a>.</li>
<li>Load up a terminal console.</li>
<li>Install libaio-dev (however your Linux version installs things) e.g. <code>sudo apt install libaio-dev</code></li>
<li>Move into your Text generation webUI folder e.g. <code>cd text-generation-webui</code></li>
<li>Start the Text generation webUI Python environment e.g. <code>./start_linux.sh</code></li>
<li>Text generation webUI overwrites the CUDA_HOME variable on each startup, so you will need to either force this to be changed within the environment OR change it each time you <code>./start_linux.sh</code></li>
<li>You can set the CUDA_HOME environment with <code>export CUDA_HOME=/usr/local/cuda</code> or <code>export CUDA_HOME=/etc/alternatives/cuda</code>. On some systems only one of those two commands may be the correct command, so you may need to try one, see if it works, if not try the other. IF you do not set it, expect a big messy output to the log when you try to activate DeepSpeed.</li>
<li>Now install deepspeed with <code>pip install deepspeed</code></li>
<p><strong>Note:</strong> You can run <code>ds_report</code> when you have installed DeepSpeed on your system to see if it is working correctly</p>
<li>You can now start Text generation webUI <code>python server.py</code> ensuring to activate your extensions.</li>
</ol>
<p><a href="#toc">Back to top of page</a></p>
<h4>Windows - DeepSpeed v11.1 or v11.2 Installation Instructions</h4>
<p>Currently/Officially only DeepSpeed v8.3 is installing on Windows, due to the broken installation routine by Microsoft, however, between myself and <a href="https://github.com/S95Sedan" target="_blank">S95Sedan</a> its now possible to install DeepSpeed v11.1 or v11.2 on Windows.</p>
<h4>DeepSpeed on Windows - <span class="option-a">Option A</span></h4>
<p>This is to use the pre built DeepSpeed v11.2 wheel file. This is quite a quick process and should work for 99&percnt; of people.</p>
<p><strong>Note:</strong> In my tests, with this method you will <strong>not</strong> need to install the Nvidia CUDA toolkit to make this work, but AllTalk may warn you when starting DeepSpeed that it doesn't see the CUDA Toolkit; however, it works fine for TTS purposes.</p>
<ol>
<li>Download the correct wheel version for your CUDA and Python version file <a href="https://github.com/erew123/alltalk_tts/releases/tag/deepspeed" target="_blank">from here</a> and save the file it inside your <strong>text-generation-webui</strong> folder.</li>
<li>At a command prompt window, move into your <strong>text-generation-webui folder</strong>, you can now start the Python environment for text-generation-webui:<br>
<br><code>cmd_windows.bat</code></li><br>
<li>With the file that you saved in the <strong>text-generation-webui folder</strong>, you now type the following:<br>
<br><code>pip install "deepspeed-0.11.2+<b>yourversionhere</b>-win_amd64.whl"</code></li><br>
<li>This should install through cleanly and you should now have DeepSpeed v11.2 installed within the Python 3.11 environment of text-generation-webui.</li>
<li>When you start up text-generation-webui, and AllTalk starts, you should see <strong>[AllTalk Startup] DeepSpeed Detected</strong></li>
<li>Within AllTalk, you will now have a checkbox for <strong>Activate DeepSpeed</strong> though remember you can only change <strong>1x setting every 15 or so seconds</strong>, so don't try to activate DeepSpeed <strong>and</strong> LowVRAM/Change your model simultaneously. Do one of those, wait 15-20 seconds until the change is confirmed in the terminal/command prompt, then you can change the other. When you are happy it works, you can set the default start-up settings in the settings page.</li>
</ol>
<h4>DeepSpeed on Windows - <span class="option-b">Option B</span></h4>
<p>Due to the complexity of this, Im not keeping the instructions within this document as it would be too complex to format.</p>
<p>As such, the instuctions can be found on this <a href="https://github.com/erew123/alltalk_tts?tab=readme-ov-file#-option-2---a-bit-more-complicated" target="_blank">link</a>
<p><a href="#toc">Back to top of page</a></p>
<h2 id="other-features"><strong>Other Features of AllTalk TTS Extension for Text generation webUI</strong></h2>
<h3>Start-up Checks</h3>
<p>Ensures a minimum TTS version (0.21.3) is installed and provides an error/instructions if not.</p>
<p>Performs a basic environment check to ensure everything should work e.g. is the model already downloaded, are the configuration files set correctly etc.</p>
<p>Downloads the Xtts model (version 2.0.2) to improve generation speech quality as the 2.0.3 model sounded terrible. The API TTS version uses the latest model (2.0.3 at the time of writing) so you have the best of both worlds.</p>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="TTSmodels">TTS Models/Methods</h3>
<p>It's worth noting that all models and methods can and do sound different from one another. Many people complained about the quality of audio produced by the 2.0.<b>3</b> model, so this extension will download the 2.0.<b>2</b> model to your models folder and give you the choice to use 2.0.<b>2</b> <b>(API Local and XTTSv2 Local)</b> or use the most current model 2.0.<b>3</b> <b>(API TTS)</b>. As/When a new model is released by AllTalk it will be downloaded by the TTS service on startup and stored wherever the TTS service keeps new models on your operating system of choice.</p>
<ul>
<li><strong>API TTS:</strong> Uses the current TTS model available that's downloaded by the TTS API process (e.g. version 2.0.3 at the time of writing). This model is not stored in your "models" folder, but elsewhere on your system and managed by the TTS software.</li>
<li><strong>API Local:</strong> Utilizes the <b>2.0.2</b> local model stored at <b>/alltalk_tts/models/xttsv2_2.0.2</b>.</li>
<li><strong>XTTSv2 Local:</strong> Employs the <b>2.0.2</b> local model <b>/alltalk_tts/models/xttsv2_2.0.2</b> and utilizes a distinct TTS generation method. <b>Supports DeepSpeed acceleration</b>.</li>
</ul>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="demotesttts">Demo/Test TTS</h3>
<h2 id="demotesttts">Demo/Test TTS</h2>
<div id="container"> <div id="container">
<form method="post" action="/tts-demo-request" id="ttsForm"> <form method="post" action="/tts-demo-request" id="ttsForm">
<label for="text">Text:</label> <label for="text">Text:</label>
@@ -1102,141 +915,398 @@ simple_webpage = """
audioPlayer.play(); // Play the audio; audioPlayer.play(); // Play the audio;
}); });
</script> </script>
<p><a href="#toc">Back to top of page</a></p> <p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<h3 id="customTTSmodels">Custom TTS Models and Model path</h3> <h2 id="using-voice-samples"><strong>Using Voice Samples</strong></h2>
<h4 id="where-are-the-sample-voices-stored">Where are the sample voices stored?</h4>
<p style="padding-left: 30px;">Voice samples are stored in <span style="color: #3366ff;">/alltalk_tts/voices/</span> and should be named using the following format <span style="color: #3366ff;">name.wav</span></p>
<h4 id="where-are-the-outputs-stored">Where are the outputs stored &amp; Automatic output wav file deletion.</h4>
<p style="padding-left: 30px; text-align: justify;">Voice outputs are stored in&nbsp;<span style="color: #3366ff;">/alltalk_tts/outputs/</span></p>
<p style="padding-left: 30px; text-align: justify;">You can configure automatic maintenence deletion of old wav files by setting <span style="color: #3366ff;">Del WAV's older than</span> in the settings above.</p>
<p style="padding-left: 30px; text-align: justify;">When <span style="color: #3366ff;">Disabled</span> your output wav files will be left untouched. When set to a setting <span style="color: #3366ff;">1 Day</span> or greater, your output wav files older than that time period will be automatically deleted on start-up of AllTalk.</p>
<h4>Where are the models stored?</h4>
<p style="padding-left: 30px; text-align: justify;">This extension will download the 2.0.2 model to <span style="color: #3366ff;">/alltalk_tts/models/</span></p>
<p style="padding-left: 30px; text-align: justify;">This TTS engine will also download the latest available model and store it wherever your OS normally stores it (Windows/Linux/Mac).</p>
<h4>How do I create a new voice sample?</h4>
<p style="padding-left: 30px; text-align: justify;">To create a new voice sample you need to make a wav file that is <span style="color: #3366ff;">22050Hz</span>, <span style="color: #3366ff;">Mono</span>, <span style="color: #3366ff;">16 bit</span> 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.</p>
<p style="padding-left: 30px; text-align: justify;">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 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 will use them in the voice its trying to recreate.</p>
<p style="padding-left: 30px; text-align: justify;">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 will show a little vocal range and emotion in their voice. Also, try to avoid a clip starting or ending with breathy sounds (breathing in/out etc).</p>
<h4>Editing your sample!</h4>
<p style="padding-left: 30px; text-align: justify;">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.</p>
<p style="text-align: justify; padding-left: 30px;">If you need to clean it up, do audio processing, volume level changes etc, do this before downsampling.<br /><br />Using the latest version of Audacity <span style="color: #3366ff;">select/highlight</span> your 6 to 30 second clip and:<br /><br /><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tracks</span> &gt;<span style="color: #3366ff;"> Resample to 22050Hz</span>&nbsp;then<br /><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tracks</span> &gt; <span style="color: #3366ff;">Mix</span> &gt; <span style="color: #3366ff;">Stereo to Mono&nbsp;</span>then<br /><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; File</span> &gt; <span style="color: #3366ff;">Export Audio</span>&nbsp;saving it as a <span style="color: #3366ff;">WAV</span> of <span style="color: #3366ff;">22050Hz</span>.</p>
<p style="padding-left: 30px; text-align: justify;">Save your generated wav file in the&nbsp;<span style="color: #3366ff;">/alltalk_tts/voices/ <span style="color: #808080;">folder.</span></span></p>
<p style="padding-left: 30px; text-align: justify;">Its worth mentioning that using AI generated audio clips may introduce unwanted sounds as its already a copy/simulation of a voice.</p>
<h4>Why doesnt it sound like XXX Person?</h4>
<p style="padding-left: 30px; text-align: justify;">The reasons can be that you:</p>
<ul style="text-align: justify;">
<li>Didn't downsample it as above.</li>
<li>Have a bad quality voice sample.</li>
<li>Try using the 3x different generation methods: <span style="color: #3366ff;">API TTS</span>, <span style="color: #3366ff;">API Local</span>, and <span style="color: #3366ff;">XTTSv2 Local</span> within the web interface, as they generate output in different ways and sound different.</li>
</ul>
<p style="padding-left: 30px; text-align: justify;">Some samples just never seem to work correctly, so maybe try a different sample. Always remember though, this is an AI model attempting to re-create a voice, so you will never get a 100% match.</p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<p>Its possible to set a custom model for the <strong>API Local</strong> and<strong> XTTSv2</strong> Local methods, or indeed point it at the same model that <strong>API TTS</strong> uses (wherever it is stored on your OS of choice). Many people did not like the sound quality of the Coqui <strong>2.0.<span style="color:#e74c3c">3</span></strong> model, and as such the AllTalk tts extension downloads the <strong>2.0.<span style="color:#2980b9">2</span></strong> model seperately to the <strong>2.0.<span style="color:#e74c3c">3</span></strong> model that TTS service downloads and manages. Typically the <strong>2.0.<span style="color:#2980b9">2</span></strong> model is stored in your <strong>/extensions/alltalk_tts/models</strong> folder and it is always downloaded on first start-up of the&nbsp;AllTalk_tts extension. However, you may either want to use a custom model version of your choosing, or point it to a different path on your system, or even point it so that&nbsp;API Local and XTTSv2 <strong>both</strong> use the same model that API TTS is using.</p>
<p>If you do choose to change the location there are a couple of things to note.&nbsp;</p>
<p>- The folder you place the model in, <strong><span style="color:#e74c3c">cannot</span></strong> be called &quot;<strong>models</strong>&quot;. This name is reserved solely for the system to identify you are or are not using a custom model.</p>
<p>- On each startup, the&nbsp;AllTalk tts extension will check the custom location and if it does not exist, it will create it and download the files it needs. It will also re download any missing files in that location that are needed for the model to function.</p>
<p>- There will be extra output at the console to inform you that you are using a custom model and each time you load up the AllTalk_tts extension or switch between models.</p>
<p>To change the model path, there are at minimum 2x settings you need to alter in the <strong>modeldownload.json</strong> file, <strong>base_path</strong> and <strong>model_path</strong>. These two settings are further detailed in the section below called <strong>Explanation of the modeldownload.json file</strong></p>
<p>You would edit the settings in the <strong>modeldownload.json</strong> file as follows (make a backup of your current file in case):&nbsp;</p>
<p><strong>Windows example:</strong>&nbsp;<span style="color:#2980b9">c:\mystuff\mydownloads\myTTSmodel\</span><em>{files in here}</em></p>
<ul> <h2 id="text-not-inside"><strong>Text Not inside</strong></h2>
<li>&nbsp; &nbsp; &nbsp; &nbsp;<strong>base_path </strong>would be &quot;<span style="color:#2980b9">c:&#92;&#92;mystuff&#92;&#92;mydownloads&quot;</span></li> <p style="padding-left: 30px; text-align: justify;">This only affects the Narrator function. Most AI models should be using asterisks or double quotes to differentiate between the Narrator or the Character, however, many models sometimes switch between using asterisks and double quotes or sometimes nothing at all for the text it outputs. <br /><br />This leaves a bit of a mess because sometimes un-marked text is narration and sometimes its the character talking, leaving no clear way to know where to split sentences and what voice to use. Whilst there is no 100% solution at the moment many models lean more one way or the other as to what that unmarked text will be (character or narrator).</p>
<li>&nbsp; &nbsp; &nbsp; &nbsp;<strong>model_path</strong> would be:<span style="color:#2980b9">&nbsp;&quot;myTTSmodel&quot;</span></li> <p style="padding-left: 30px; text-align: justify;">As such, the "Text not inside" function at least gives you the choice to set how you want the TTS engine to handle situations of un-marked text.</p>
</ul> <div style="text-align: center;"><img src="/static/textnotinside.jpg" alt="When the AI doesnt use an asterisk or a quote" /></div>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<p><strong>Note:</strong> On Windows systems, you have to specify a<strong> <span style="color:#e74c3c">double backslash &#92;&#92;</span></strong> for each folder level in the path (as above).</p>
<p><strong>Linux example:</strong>&nbsp;<span style="color:#2980b9">/home/myaccount/myTTSmodel/</span><em>{files in here}</em></p>
<ul> <h2 id="low-vram"><strong>Low VRAM</strong></h2>
<li>&nbsp; &nbsp; &nbsp; &nbsp;<strong>base_path </strong>would be &quot;<span style="color:#2980b9">/home/myaccount&quot;</span></li> <p style="padding-left: 30px; text-align: justify;">The Low VRAM option is a crucial feature designed to enhance performance under constrained (VRAM) conditions, as the TTS models require 2GB-3GB of VRAM to run effectively. This feature strategically manages the relocation of the Text-to-Speech (TTS) model between your system's Random Access Memory (RAM) and VRAM, moving it between the two on the fly. Obviously, this is very useful for people who have smaller graphics cards and will use all their VRAM to load in their LLM.</p>
<li>&nbsp; &nbsp; &nbsp; &nbsp;<strong>model_path</strong> would be:<span style="color:#2980b9">&nbsp;&quot;TTSmodel&quot;</span></li> <p style="padding-left: 30px; text-align: justify;">When you dont have enough VRAM free after loading your LLM model into your VRAM (Normal Mode example below), you can see that with so little working space, your GPU will have to swap in and out bits of the TTS model, which causes horrible slowdown.</p>
</ul> <p style="padding-left: 30px; text-align: justify;"><span style="color: #ff0000;">Note:</span> An Nvidia Graphics card is required for the LowVRAM option to work, as you will just be using system RAM otherwise.&nbsp;</p>
<h4>How It Works:</h4>
<p style="padding-left: 30px; text-align: justify;">The Low VRAM mode intelligently orchestrates the relocation of the entire TTS model and stores the TTS model in your system RAM. When the TTS engine requires VRAM for processing, the entire model seamlessly moves into VRAM, causing your LLM to unload/displace some layers, ensuring optimal performance of the TTS engine.</p>
<p style="padding-left: 30px; text-align: justify;">Post-TTS processing, the model moves back to system RAM, freeing up VRAM space for your Language Model (LLM) to load back in the missing layers. This adds about 1-2 seconds to both text generation by the LLM and the TTS engine.</p>
<p style="padding-left: 30px; text-align: justify;">By transferring the entire model between RAM and VRAM, the Low VRAM option avoids fragmentation, ensuring the TTS model remains cohesive and has all the working space it needs in your GPU, without having to just work on small bits of the TTS model at a time (which causes terrible slow down).</p>
<p style="padding-left: 30px; text-align: justify;">This creates a TTS generation performance Boost for Low VRAM Users and is particularly beneficial for users with less than 2GB of free VRAM after loading their LLM, delivering a substantial 5-10x improvement in TTS generation speed.</p>
<div style="text-align: center;"><img src="/static/lowvrammode.png" alt="How Low VRAM Works" /></div>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<p>Once you restart the&nbsp;AllTalk_tts extension, it will check this path for the files and output any details at the console.</p>
<p>When you are happy it's' working correctly, you are welcome to go delete the models folder stored at&nbsp;<strong>/extensions/alltalk_tts/models.</strong></p>
<p>If you wish to change the files that the modeldownloader is pulling at startup, you can futher edit the <strong>modeldownload.json</strong> and change the http addresses within this files&nbsp;<strong>files_to_download</strong> section &nbsp;e.g.</p>
<p>&nbsp; &nbsp; &quot;files_to_download&quot;: {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;LICENSE.txt&quot;: &quot;https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;README.md&quot;: &quot;https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;config.json&quot;: &quot;https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;model.pth&quot;: &quot;https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;vocab.json&quot;: &quot;https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true&quot;<br />
&nbsp; &nbsp; }</p>
<p><a href="#toc">Back to top of page</a></p>
<h3 id="configuration-details"><strong>Configuration Details</strong></h3> <h2 id="deepspeed"><strong>DeepSpeed</strong></h2>
<p>Explanation of the <b>confignew.json</b> file:</p> <p style="padding-left: 30px; text-align: justify;">DeepSpeed provides a 2x-3x speed boost for Text-to-Speech and AI tasks. It's all about making AI and TTS happen faster and more efficiently.</p>
<ul>
<li><strong>Model Parallelism:</strong> Spreads work across multiple GPUs, making AI/TTS models handle tasks more efficiently.</li>
<li><strong>Memory Magic:</strong> Optimizes how memory is used, reducing the memory needed for large AI/TTS models.</li>
<li><strong>Handles More Load:</strong> Scales up to handle larger workloads with improved performance.</li>
<li><strong>Smart Resource Use:</strong> Uses your computer's resources smartly, getting the most out of your hardware.</li>
</ul>
<div style="text-align: center;"><img src="/static/deepspeedexample.jpg" alt="DeepSpeed on vs off" /></div>
<p style="padding-left: 30px; text-align: justify;">DeepSpeed only works with the <span style="color: #3366ff;">XTTSv2 Local</span> model and will deactivate when other models are selected, even if the checkbox still shows as being selected.</p>
<p style="padding-left: 30px; text-align: justify;"><span style="color: #ff0000;">Note:</span> DeepSpeed/AllTalk may warn if the Nvidia Cuda Toolkit and CUDA_HOME environment variable isnt set correctly. On Linux you need CUDA_HOME configured correctly; on Windows, if you use the pre-built wheel its ok without.</p>
<p style="padding-left: 30px; text-align: justify;"><span style="color: #ff0000;">Note:</span><strong>&nbsp;</strong>You do <strong>not</strong> need to set Text-generation-webUi's --deepspeed setting for AllTalk to be able to use DeepSpeed.</p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<code><span class="key">"activate:"</span> <span class="value">true</span>,</code><span class="key"> Used within the code, do not change.</span><br>
<code><span class="key">"autoplay:"</span> <span class="value">true</span>,</code><span class="key"> Controls whether the TTS audio plays automatically within Text generation webUI.</span><br>
<code><span class="key">"branding:"</span> <span class="value">"AllTalk "</span>,</code><span class="key"> Used to change the default name shown on the command line. The name needs a space after it e.g. "Mybrand ".</span><br>
<code><span class="key">"deepspeed_activate:"</span> <span class="value">false</span>,</code><span class="key"> Controls whether the DeepSpeed option is activated or disabled in the Gradio interface.</span><br>
<code><span class="key">"delete_output_wavs:"</span> <span class="value">""Disabled""</span>,</code><span class="key"> If set this will delete your old output wav files, older than the date set, when the system starts up.</span><br>
<code><span class="key">"ip_address:"</span> <span class="value">"127.0.0.1"</span>,</code><span class="key"> Specifies the default IP address for the web server.</span><br>
<code><span class="key">"language:"</span> <span class="value">"English"</span>,</code><span class="key"> Specifies the default language to use for TTS.</span><br>
<code><span class="key">"low_vram:"</span> <span class="value">false</span>,</code><span class="key"> Controls whether the Low VRAM option is enabled or disabled.</span><br>
<code><span class="key">"local_temperature:"</span> <span class="value">"0.70"</span>,</code><span class="key"> Sets the temperature to use with the API Local and XTTSv2 Local methods.</span><br>
<code><span class="key">"local_repetition_penalty:"</span> <span class="value">"10.0"</span>,</code><span class="key"> Sets the repetition penalty to use with the API Local and XTTSv2 Local methods.</span><br>
<code><span class="key">"tts_model_loaded:"</span> <span class="value">true</span>,</code><span class="key"> Used within the code, do not change.</span><br>
<code><span class="key">"tts_model_name:"</span> <span class="value">"tts_models/multilingual/multi-dataset/xtts_v2"</span>,</code><span class="key"> Specifies the model that the "API TTS" method will use for TTS generation.</span><br>
<code><span class="key">"narrator_enabled:"</span> <span class="value">"female_02.wav"</span>,</code><span class="key"> Specifies the default narrator voice to use for TTS.</span><br>
<code><span class="key">"narrator_voice:"</span> <span class="value">"false"</span>,</code><span class="key"> Enables and disables the narrator function.</span><br>
<code><span class="key">"port_number:"</span> <span class="value">"7851"</span>,</code><span class="key"> Specifies the default port number for the web server.</span><br>
<code><span class="key">"output_folder_wav:"</span> <span class="value">"extensions/alltalk_tts/outputs/"</span>,</code><span class="key"> Sets the output folder to send files to on generating TTS.</span><br>
<code><span class="key">"remove_trailing_dots:"</span> <span class="value">false</span>,</code><span class="key"> Controls whether trailing dots are removed from text segments before generation.</span><br>
<code><span class="key">"show_text:"</span> <span class="value">true</span>,</code><span class="key"> Controls whether message text is shown under the audio player.</span><br>
<code><span class="key">"tts_method_api_local:"</span> <span class="value">false</span>,</code><span class="key"> Controls whether the "API Local" model/method is turned on or off.</span><br>
<code><span class="key">"tts_method_api_tts:"</span> <span class="value">false</span>,</code><span class="key"> Controls whether the "API TTS" model/method is turned on or off.</span><br>
<code><span class="key">"tts_method_xtts_local:"</span> <span class="value">true</span>,</code><span class="key"> Controls whether the "XTTSv2 Local" model/method is turned on or off.</span><br>
<code><span class="key">"voice:"</span> <span class="value">"female_01.wav"</span></code><span class="key"> Specifies the default voice to use for TTS.</span><br>
<p><a href="#toc">Back to top of page</a></p>
<p>Explanation of the <b>modeldownload.json</b> file:</p> <h3 id="deepspeed-linux">DeepSpeed Setup - Linux</h3>
<p style="padding-left: 30px;">➡️DeepSpeed requires an Nvidia Graphics card!⬅️</p>
<ol>
<li>Preferably use your built in package manager to install the CUDA toolkit. Alternatively download and install the Nvidia Cuda Toolkit for Linux <a href="https://developer.nvidia.com/cuda-toolkit-archive">Nvidia Cuda Toolkit 11.8 or 12.1</a></li>
<li>Open a terminal console.</li>
<li>Install <span style="color: #3366ff;">libaio-dev</span> (however your Linux version installs things) e.g. <span style="color: #3366ff;">sudo apt install libaio-dev</span></li>
<li>Move into your Text generation webUI folder e.g. <span style="color: #0000ff;"><span style="color: #3366ff;">cd text-generation-webui</span><br /></span></li>
<li>Start the Text generation webUI Python environment <span style="color: #0000ff;"><span style="color: #3366ff;">./cmd_linux.sh</span><br /></span></li>
<li style="text-align: left;">Text generation webUI <strong>overwrites</strong> the <strong>CUDA_HOME</strong> environment variable each time you <span style="color: #3366ff;">./cmd_linux.sh</span> or <span style="color: #3366ff;">./start_linux.sh&nbsp;</span>so you will need to either permanently change within the python environment OR set CUDA_HOME it each time you <span style="color: #3366ff;">./cmd_linux.sh</span>. Details to change it each time are on the next step. Below is a link to Conda's manual and changing environment variables permanently though its possible changing it permanently could affect other extensions, you would have to test.<a href="https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#set-env-vars"> Conda manual - Environment variables<br /></a></li>
<li>You can temporarily set the <span style="color: #3366ff;">CUDA_HOME</span> environment with (Standard Ubuntu path below, but it could vary on other Linux flavours):<br /><br /><span style="color: #0000ff;"><span style="color: #3366ff;">export CUDA_HOME=/etc/alternatives/cuda</span>&nbsp;</span><strong>every</strong> time you run <span style="color: #0000ff;"><span style="color: #808080;">.<span style="color: #3366ff;">/cmd_linux.sh</span></span><br /><br /></span>If you try to start DeepSpeed with the CUDA_HOME path set incorrectly, expect an error similar to:<br /><br /><span style="color: #ffcc00;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[Errno 2] No such file or directory: /home/yourname/text-generation-webui/installer_files/env/bin/nvcc<br /><br /></span></li>
<li>Now install deepspeed with <span style="color: #0000ff;"><span style="color: #3366ff;">pip install deepspeed</span><br /></span></li>
<li>You can now start Text generation webUI <span style="color: #3366ff;">python server.py</span> ensuring to activate your extensions.<br /><br />Just to reiterate, starting Text-generation-webUI with <span style="color: #3366ff;">./start_linux.sh</span> will overwrite the CUDA_HOME variable unless you have permanently changed it, hence always starting it with <span style="color: #3366ff;">./cmd_linux.sh</span>&nbsp;<strong>then</strong> setting the environment variable manually <span style="color: #3366ff;">export CUDA_HOME=/etc/alternatives/cuda</span> and <strong>then</strong> <span style="color: #3366ff;">python server.py</span>&nbsp;which is how you would need to run it each time, unless you permanently set the environment variable for CUDA_HOME within Text-generation-webUI's standard Python environment.<br /><br /><span style="color: #ff0000;">Removal</span><strong> -</strong> If it became necessary to uninstall DeepSpeed, you can do so with <span style="color: #3366ff;">./cmd_linux.sh</span> and then <span style="color: #3366ff;">pip uninstall deepspeed</span></li>
</ol>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<code><span class="key">"base_path:"</span> <span class="value">"models"</span>,</code><span class="key"> Specifies the base directory for the TTS models. If this is changed from the word "models" then the new custom path will be used e.g. <b>C:&bsol;&bsol;mymodels</b></span><br>
<p><b>(Please note the use of a double backslash &bsol;&bsol; between folders on Windows systems. Linux systems will use "/mymodels" style)</b></p>
<code><span class="key">"model_path:"</span> <span class="value">"xttsv2_2.0.2"</span>,</code><span class="key"> Specifies the directory path for the XTTSv2 model underneath the base_path.</span><br>
<p><b>So if base_path is C:&bsol;&bsol;mymodels and model_path is xttsv2_2.0.2, then your path would become c:&bsol;&bsol;mymodels&bsol;&bsol;xttsv2_2.0.2</b></p>
<code><span class="key">"files_to_download:"</span></code><span class="key"> Dictionary containing files to download with their respective URLs.</span><br>
<code><span class="key"> "LICENSE.txt":</span> <span class="value">"https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true"</span>,</code><span class="key"> License file URL.</span><br>
<code><span class="key"> "README.md":</span> <span class="value">"https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true"</span>,</code><span class="key"> README file URL.</span><br>
<code><span class="key"> "config.json":</span> <span class="value">"https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true"</span>,</code><span class="key"> Config file URL.</span><br>
<code><span class="key"> "model.pth":</span> <span class="value">"https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true"</span>,</code><span class="key"> Model file URL.</span><br>
<code><span class="key"> "vocab.json":</span> <span class="value">"https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true"</span>,</code><span class="key"> Vocabulary file URL.</span><br>
<p>If you wish to set your own path</p>
<h3 id="curl-commands"><strong>CURL Commands</strong></h3> <h3 id="deepspeed-windows">DeepSpeed Setup - Windows</h3>
<p><b>Generating TTS - Linux</b></p> <p style="padding-left: 30px;">➡️DeepSpeed requires an Nvidia Graphics card!⬅️</p>
<code><span class="key">curl -X POST -H "Content-Type: application/json" -d '{"text": "This is text to generate as TTS","voice": "female_01.wav", "language": "en", "output_file": "outputfile.wav"}' "http://127.0.0.1:7851/api/generate"</code></span> <p style="padding-left: 30px;">DeepSpeed v11.2 will work on the current default text-generation-webui Python 3.11 environment! You have 2x options for how to setup DeepSpeed on Windows. A quick way <span style="color: #339966;"><strong>Option 1</strong></span>&nbsp;and a long way <span style="color: #ff9900;"><strong>Option 2</strong></span>.</p>
<p><b>Generating TTS - Windows</b></p> <p style="padding-left: 30px;">Thanks to <a href="https://github.com/S95Sedan">@S95Sedan</a> They managed to get DeepSpeed 11.2 working on Windows via making some edits to the original Microsoft DeepSpeed v11.2 installation. The original post is <a href="https://github.com/oobabooga/text-generation-webui/issues/4734#issuecomment-1843984142">here</a>.<br /><br /></p>
<code><span class="key">curl -X POST -H "Content-Type: application/json" -d "{&#92;&quot;text&#92;&quot;: &#92;&quot;This is text to generate as TTS&#92;&quot;, &#92;&quot;voice&#92;&quot;: &#92;&quot;female_01.wav&#92;&quot;, &#92;&quot;language&#92;&quot;: &#92;&quot;en&#92;&quot;, &#92;&quot;output_file&#92;&quot;: &#92;&quot;outputfile.wav&#92;&quot;}" http://127.0.0.1:7851/api/generate</span></code> <p style="padding-left: 30px;"><strong><span style="text-decoration: underline;"><span style="color: #339966; text-decoration: underline;">OPTION 1 - <span style="color: #000000; text-decoration: underline;">Pre-Compiled Wheel Deepspeed v11.2 (Python 3.11 and 3.10)</span></span></span></strong></p>
<p><b>Generating TTS - Notes</b></p> <ol>
<p>Replace <code>This is text to generate as TTS</code> with whatever you want it to say. <code>female_01.wav</code> with the voice sample you want to use. <code>output_file.wav</code> with the file name you want it to create.</p> <li>Download the correct wheel version for your Python/Cuda from <a href="https://github.com/erew123/alltalk_tts/releases/tag/deepspeed" target="_blank">here</a> and save the file it inside your <span style="color: #3366ff;">text-generation-webui folder</span>.</li>
<p>JSON return <code>{"status":"generate-success","data":{"audio_path":"outputfile.wav"}}</code></p> <li>Open a command prompt window, move into your <span style="color: #3366ff;">text-generation-webui folder</span> you can now start the Python environment for text-generation-webui <span style="color: #3366ff;">cmd_windows.bat<br /></span></li>
<li>With the file that you saved in the <span style="color: #3366ff;">text-generation-webui folder</span> you now type the following, replacing <span style="color: #99cc00;">your-version</span> with the name of the file you have:<br /><br /><span style="color: #3366ff;">pip install "deepspeed-0.11.2+<span style="color: #99cc00;">your-version</span>-win_amd64.whl"<br /><br /></span></li>
<li>This should install through cleanly and you should now have DeepSpeed v11.2 installed within the Python 3.11/3.10 environment of text-generation-webui.</li>
<li>When you start up text-generation-webui, and AllTalk starts, you should see:<br /><br /><span style="background-color: #999999;"><span style="background-color: #ffffff;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [AllTalk Startup] DeepSpeed</span></span><strong><span style="background-color: #999999;"><span style="color: #ffff00; background-color: #ffffff;"> Detected<br /></span></span></strong><strong><span style="background-color: #999999;"><span style="color: #ffff00; background-color: #ffffff;"><br /></span></span></strong></li>
<li>Within AllTalk, you will now have a checkbox for <span style="color: #3366ff;">Activate DeepSpeed</span> though remember you can only change 1x setting every 15 or so seconds, so dont try to activate DeepSpeed and LowVRAM simultaneously. When you are happy it works, you can set the default start-up settings in the settings page.<br /><br /><span style="color: #ff0000;">Removal</span> - If it became necessary to uninstall DeepSpeed, you can do so with <span style="color: #3366ff;">cmd_windows.bat</span> and then <span style="color: #3366ff;">pip uninstall deepspeed<br /></span><span style="color: #3366ff;"><br /><br /></span><span style="color: #3366ff;"><span style="text-decoration: underline;"><span style="color: #ff9900; text-decoration: underline;"><strong>OPTION 2 - <span style="color: #000000; text-decoration: underline;">Manual build of DeepSpeed&nbsp;v11.2 (Python 3.11 and 3.10)</span></strong></span></span><br /><br /></span>Due to the complexity of this, and the complicated formatting, instructions can be found on this <a href="https://github.com/erew123/alltalk_tts?tab=readme-ov-file#-option-2---a-bit-more-complicated" target="_blank">link</a></li>
</ol>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<p><b>Switch Model</b></p>
<code><span class="key">curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20Local"</code></span><br>
<code><span class="key">curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20TTS"</code></span><br>
<code><span class="key">curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=XTTSv2%20Local"</code></span>
<p>Switch between the 3 models respectively.</p>
<p>JSON return <code>{"status": "model-success"}</code></p>
<p><b>Switch DeepSpeed on/off</b></p>
<code><span class="key">curl -X POST -H "Content-Type: application/json" "http://127.0.0.1:7851/api/deepspeed?new_deepspeed_value=True"</code></span>
<p>Replace <code>True</code> with <code>False</code> to disable DeepSpeed mode.</p>
<p>JSON return <code>{"status": "deepspeed-success"}</code></p>
<p><b>Note:</b> Enabling DeepSpeed on systems that dont have DeepSpeed installed, may cause errors.</p>
<p><b>Switch Low VRAM on/off</b></p> <h2 id="TTSmodels">TTS Models/Methods</h2>
<code><span class="key">curl -X POST -H "Content-Type: application/json" "http://127.0.0.1:7851/api/lowvramsetting?new_low_vram_value=True"</code></span> <p style="padding-left: 30px; text-align: justify;">It's worth noting that all models and methods can and do sound different from one another. Many people complained about the quality of audio produced by the 2.0.3 model, so this extension will download the 2.0.2 model to your models folder and give you the choice to use 2.0.2 (<span style="color: #3366ff;">API Local</span> and <span style="color: #3366ff;">XTTSv2 Local</span>) or use the most current model 2.0.3 (<span style="color: #3366ff;">API TTS</span>). As/When a new model is released by Coqui it will be downloaded by the TTS service on startup and stored wherever the TTS service keeps new models for your operating system.</p>
<p>Replace <code>True</code> with <code>False</code> to disable Low VRAM mode.</p> <ul>
<p>JSON return <code>{"status": "lowvram-success"}</code></p> <li><span style="color: #3366ff;">API TTS:</span> Uses the current TTS model available that's downloaded by the TTS API process ( version 2.0.3 at the time of writing). This model is not stored in your "models" folder, but elsewhere on your system and managed by the TTS software.<br /></li>
<p><a href="#toc">Back to top of page</a></p> <li><span style="color: #3366ff;">API Local:</span> Utilizes the 2.0.2 local model stored at <span style="color: #3366ff;">/alltalk_tts/models/xttsv2_2.0.2<br /></span></li>
<li><span style="color: #3366ff;">XTTSv2 Local: </span>Utilizes the 2.0.2 local model <span style="color: #3366ff;">/alltalk_tts/models/xttsv2_2.0.2</span> and utilizes a distinct TTS generation method. <span style="color: #99cc00;">Supports DeepSpeed acceleration</span>.</li>
</ul>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<h3 id="debugging-and-tts-generation-information"><strong>Debugging and TTS Generation Information:</strong></h3>
<p>Command line outputs are more verbose to assist in understanding backend processes and debugging.</p>
<p>Its possible during startup you can get a warning message such as <b>[AllTalk Startup] Warning TTS Subprocess has NOT started up yet, Will keep trying for 60 seconds maximum</b> This is normal behavior 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 60 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</p>
<p>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 configuration details.</p>
<p><a href="#toc">Back to top of page</a></p>
<h2 id="references"><strong>Thanks & References</strong></h2> <h2 id="temperature-and-repetition-settings"><strong>Model Temperature and Repetition Settings</strong></h3>
<h3>Coqui TTS Engine</h3> <p style="padding-left: 30px; text-align: justify;">It is recommended not to modify these settings unless you fully comprehend their effects. A general overview is provided below for reference.</p>
<ul> <p style="padding-left: 30px; text-align: justify;">Changes to these settings won't take effect until you restart AllTalk/Text generation webUI.</p>
<li><a href="https://coqui.ai/cpml.txt" target="_blank">Coqui License</a></li> <p style="padding-left: 30px; text-align: justify;">These settings only affect API Local and XTTSv2 Local methods.</p>
<li><a href="https://github.com/coqui-ai/TTS" target="_blank">Coqui TTS GitHub Repository</a></li> <h4 style="text-align: justify;">Repetition Penalty:</h4>
</ul> <p style="padding-left: 30px; text-align: justify;">In the context of text-to-speech (TTS), the Repetition Penalty<strong>&nbsp;</strong>influences how the model handles the repetition of sounds, phonemes, or intonation patterns. Here's how it works:</p>
<h3>Extension coded by</h3> <ul style="text-align: justify;">
<ul> <li><strong>Higher Repetition Penalty (e.g. 16.0):</strong> The model is less likely to repeat sounds or patterns. It promotes diversity in the generated speech. This can result in a more varied and expressive output, though introduce elements of unpredictability in the TTS output.<br /></li>
<li><a href="https://github.com/erew123" target="_blank">Erew123 GitHub Profile</a></li> <li><strong>Lower Repetition Penalty (e.g. 2.0):</strong> The model is more tolerant of repeating sounds or patterns. This might lead to more repetition in the generated speech, potentially making it sound more structured or rhythmically consistent. Lower values can still introduce expressive variations, but to a lesser extent. This tendency means that the generated speech may remain closer to the original sample.</li>
</ul> </ul>
<h3>Thanks to & Text generation webUI</h3> <p style="padding-left: 30px; text-align: justify;">The factory setting for repetition penalty is 10.0</p>
<ul> <h4>Temperature:</h4>
<li><a href="https://github.com/oobabooga/text-generation-webui" target="_blank">Ooobabooga GitHub Repository</a> (Portions of orginal Coquii_TTS extension)</li> <p style="padding-left: 30px; text-align: justify;">Temperature&nbsp;influences the randomness of the generated speech. Here's how it affects the output:</p>
</ul> <ul style="text-align: justify;">
<h3>Thanks to</h3> <li><strong>Higher Temperature (e.g. 0.95):</strong> Increases randomness in how the model selects and pronounces phonemes or intonation patterns. This can result in more creative, but potentially less controlled or "stable," speech that may deviate from the input sample. It adds an element of unpredictability and variety, contributing to expressiveness in the voice output created.<br /></li>
<ul> <li><strong>Lower Temperature (e.g. 0.20):</strong> Reduces randomness, making the model more likely to closely mimic the input sample's voice, intonation, and overall style. This tends to produce more "coherent" speech that aligns closely with the characteristics of the training data or input voice sample. It adds a level of predictability and consistency, potentially reducing expressive variations. So it could end up sounging too monotone.</li>
<li><a href="https://github.com/daswer123" target="_blank">daswer123 GitHub Profile</a> (Assistance with cuda to cpu moving)</li> </ul>
<li><a href="https://github.com/S95Sedan" target="_blank">S95Sedan GitHub Profile</a> (Editing the Microsoft DeepSpeed v11.x installation files so they work)</li> <p style="padding-left: 30px; text-align: justify;">The factory setting for temperature is 0.70</p>
<li><a href="https://github.com/kanttouchthis" target="_blank">kanttouchthis GitHub Profile</a> (Portions of orginal Coquii_TTS extension)</li>
<li><a href="https://github.com/kanttouchthis" target="_blank">Wuzzooy GitHub Profile</a> (Trying out the code while in development)</li>
</ul> <h4><strong>Temperature and Repetition Settings Examples:</strong></h4>
<p><a href="#toc">Back to top of page</a></p> <ul style="text-align: justify;">
<li><strong>Temp High (0.90) and Repetition High (16.0):</strong><br /> Result: Speech may sound highly creative and diverse, with reduced repetition. It could be more expressive and unpredictable.<br /></li>
<li><strong>Temp Low (0.20) and Repetition High (16.0):</strong><br /> Result: Output tends to be focused and deterministic, but with reduced repetition. It may sound structured and less expressive.<br /></li>
<li><strong>Temp High (0.90) and Repetition Low (2.0):</strong><br /> Result: Speech may be more creative and diverse, with tolerance for repeating sounds. It could have expressive variations but with some structured patterns.<br /></li>
<li><strong>Temp Low (0.20) and Repetition Low (2.0):</strong><br /> Result: Output is focused and deterministic, with tolerance for repeating sounds. It may sound more structured and less expressive.</li>
</ul>
<p style="text-align: justify;">Factory settings should be fine for most people, however if you choose to experiment, setting extremely high or low values, especially without a good understanding of their effects, may lead to flat-sounding output or very strange-sounding output. It's advisable to experiment with adjustments incrementally and observe the impact on the generated speech to find a balance that suits your desired outcome.</p>
<p style="text-align: justify;"><a href="#toc">Back to top of page</a><br /></p>
<h2 id="start-up-checks">Start-up Checks</h2>
<p style="padding-left: 30px; text-align: justify;">AllTalk performs a variety of checks on startup and will warn out messages at the console should you need to do something such as update your TTS version.&nbsp;</p>
<p style="padding-left: 30px; text-align: justify;">A basic environment check to ensure everything should work e.g. is the model already downloaded, are the configuration files set correctly etc.</p>
<p style="padding-left: 30px; text-align: justify;">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.</p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<h2 id="customTTSmodels">Custom TTS Models and Model path</h2>
<p style="padding-left: 30px; text-align: justify;">Its possible to set a custom model for the <span style="color: #3366ff;">API Local</span> and <span style="color: #3366ff;">XTTSv2 Local</span> methods, or indeed point it at the same model that <span style="color: #3366ff;">API TTS</span> uses (wherever it is stored on your OS of choice).</p>
<p style="padding-left: 30px; text-align: justify;">Many people did not like the sound quality of the Coqui <span style="color: #000000;">2.0.3</span> model, and as such the AllTalk downloads the <span style="color: #000000;">2.0.2</span> model seperately from the <span style="color: #000000;">2.0.3</span> model that TTS service downloads and manages.</p>
<p style="padding-left: 30px; text-align: justify;">Typically the <span style="color: #000000;">2.0.2</span> model is stored in your <span style="color: #3366ff;">/alltalk_tts/models</span> folder and it is downloaded on first start-up of the&nbsp;AllTalk_tts extension. However, you may either want to use a custom model version of your choosing, or re-point AllTalk to a different path on your system, or even point it so that&nbsp;<span style="color: #3366ff;">API Local</span> and <span style="color: #3366ff;">XTTSv2 Local</span> both use the same model that <span style="color: #3366ff;">API TTS</span> is using.</p>
<p style="padding-left: 30px; text-align: justify;">If you do choose to change the location there are a couple of things to note.&nbsp;</p>
<ul style="text-align: justify;">
<li>The folder you place the model in, <span style="color: #3366ff;">cannot </span>be called "<span style="color: #3366ff;">models</span>". This name is reserved solely for the system to identify you are or are not using a custom model.</li>
<li>On each startup, the&nbsp;AllTalk tts extension will check the custom location and if it does not exist, it will create it and download the files it needs. It will also re download any missing files in that location that are needed for the model to function.</li>
<li>There will be extra output at the console to inform you that you are using a custom model and each time you load up AllTalk extension or switch between models.</li>
</ul>
<p style="padding-left: 30px; text-align: justify;">To change the model path, there are at minimum 2x settings you need to alter in the <span style="color: #3366ff;">modeldownload.json</span> file, <span style="color: #3366ff;">base_path </span>and <span style="color: #3366ff;">model_path</span>.</p>
<p style="padding-left: 30px; text-align: justify;">You would edit the settings in the <span style="color: #3366ff;">modeldownload.json</span> file as follows (make a backup of your current file in case):<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; Windows path example:&nbsp;<span style="color: #2980b9;">c:&bsol;&bsol;mystuff&bsol;&bsol;mydownloads&bsol;&bsol;myTTSmodel&bsol;&bsol;</span><span style="color: #00ccff;"><em>{files in here}<br /></em></span><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; base_path</span> would be "<span style="color: #2980b9;">c:&bsol;&bsol;mystuff&bsol;&bsol;mydownloads"<br /></span><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; model_path</span> would be:<span style="color: #2980b9;">&nbsp;"myTTSmodel"</span></p>
<p style="padding-left: 30px;"><span style="color: #ff0000;">Note: </span>On Windows systems, you have to specify a <span style="color: #e74c3c;"></span><span style="color: #e74c3c;">double backslash &bsol;&bsol;</span> for each folder level in the path (as above)</p>
<p style="padding-left: 30px;">&nbsp; &nbsp; &nbsp; &nbsp; Linux path example:&nbsp;<span style="color: #2980b9;">/home/myaccount/myTTSmodel/</span><span style="color: #00ccff;"><em>{files in here}<br /></em></span><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; base_path</span> would be "<span style="color: #2980b9;">/home/myaccount"<br /></span><span style="color: #3366ff;">&nbsp; &nbsp; &nbsp; &nbsp; model_path</span> would be:<span style="color: #2980b9;">&nbsp;"TTSmodel"<br /><br /></span>Once you restart Alltalk, it will check this path for the files and output any details at the console.</p>
<p style="padding-left: 30px;">When you are happy it's' working correctly, you are welcome to go delete the models folder stored at&nbsp;<span style="color: #3366ff;">/alltalk_tts/models</span><strong>.</strong></p>
<p style="padding-left: 30px;">If you wish to change the files that the modeldownloader is pulling at startup, you can futher edit the <span style="color: #3366ff;">modeldownload.json</span> and change the https addresses within this files&nbsp;<span style="color: #3366ff;">files_to_download</span> section &nbsp;e.g.</p>
<p style="padding-left: 30px;">"files_to_download": {<br /> &nbsp; &nbsp; &nbsp; &nbsp; "LICENSE.txt": "<span style="color: #00ccff;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true</span>",<br /> &nbsp; &nbsp; &nbsp; &nbsp; "README.md": "<span style="color: #00ccff;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true</span>",<br /> &nbsp; &nbsp; &nbsp; &nbsp; "config.json": "<span style="color: #00ccff;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true</span>",<br /> &nbsp; &nbsp; &nbsp; &nbsp; "model.pth": "<span style="color: #00ccff;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true</span>",<br /> &nbsp; &nbsp; &nbsp; &nbsp; "vocab.json": "<span style="color: #00ccff;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true</span>"<br />&nbsp;}</p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page<br /></a></p>
<h2 id="configuration-details"><strong>Configuration file settings</strong></h2>
<p><span style="color: #3366ff;">confignew.json</span> file:</p>
<table>
<tr>
<th>Key</th>
<th>Default Value</th>
<th>Explanation</th>
</tr>
<tr>
<td>"activate"</td>
<td>true</td>
<td>Sets activation state within Text-generation-webUI.</td>
</tr>
<tr>
<td>"autoplay"</td>
<td>true</td>
<td>Sets autoplay within Text generation webUI.</td>
</tr>
<tr>
<td>"branding"</td>
<td>"AllTalk"</td>
<td>Used to change the default name. Requires a space e.g. "Mybrand ".</td>
</tr>
<tr>
<td>"deepspeed_activate"</td>
<td>false</td>
<td>Sets DeepSpeed activation on startup.</td>
</tr>
<tr>
<td>"delete_output_wavs"</td>
<td>"Disabled"</td>
<td>Sets duration of outputs to delete.</td>
</tr>
<tr>
<td>"ip_address"</td>
<td>"127.0.0.1"</td>
<td>Sets default IP address.</td>
</tr>
<tr>
<td>"language"</td>
<td>"English"</td>
<td>Sets default language for Text-generation-webUI TTS.</td>
</tr>
<tr>
<td>"low_vram"</td>
<td>false</td>
<td>Sets default setting for LowVRAM mode.</td>
</tr>
<tr>
<td>"local_temperature"</td>
<td>"0.70"</td>
<td>Sets default model temp for API Local and XTTSv2 Local.</td>
</tr>
<tr>
<td>"local_repetition_penalty"</td>
<td>"10.0"</td>
<td>Sets default model repetition for API Local and XTTSv2 Local.</td>
</tr>
<tr>
<td>"tts_model_loaded"</td>
<td>true</td>
<td>AllTalk internal use only. Do not change.</td>
</tr>
<tr>
<td>"tts_model_name"</td>
<td>"tts_models/multilingual/multi-dataset/xtts_v2"</td>
<td>Sets default model that API TTS is looking for through the TTS service (separate to API Local and XTTSv2 Local).</td>
</tr>
<tr>
<td>"narrator_enabled"</td>
<td>true</td>
<td>Sets default narrator on/off in Text-generation-webUI TTS.</td>
</tr>
<tr>
<td>"narrator_voice"</td>
<td>"female_02.wav"</td>
<td>Sets default wav to use for narrator in Text-generation-webUI TTS.</td>
</tr>
<tr>
<td>"port_number"</td>
<td>"7851"</td>
<td>Sets default port number for AllTalk.</td>
</tr>
<tr>
<td>"output_folder_wav"</td>
<td>"extensions/alltalk_tts/outputs/"</td>
<td>Sets default output path Text-generation-webUI should use for finding outputs.</td>
</tr>
<tr>
<td>"output_folder_wav_standalone"</td>
<td>"outputs/"</td>
<td>Sets default output path in standalone mode.</td>
</tr>
<tr>
<td>"remove_trailing_dots"</td>
<td>false</td>
<td>Sets trailing dot removal pre-generating TTS.</td>
</tr>
<tr>
<td>"show_text"</td>
<td>true</td>
<td>Sets if text should be displayed below audio in Text-generation-webUI.</td>
</tr>
<tr>
<td>"tts_method_api_local"</td>
<td>false</td>
<td>Sets API Local as the default model/method for TTS.</td>
</tr>
<tr>
<td>"tts_method_api_tts"</td>
<td>false</td>
<td>Sets API TTS as the default model/method for TTS.</td>
</tr>
<tr>
<td>"tts_method_xtts_local"</td>
<td>true</td>
<td>Sets XTTSv2 Local as the default model/method for TTS.</td>
</tr>
<tr>
<td>"voice"</td>
<td>"female_01.wav"</td>
<td>Sets default voice for TTS.</td>
</tr>
</table>
<p><span style="color: #3366ff;">modeldownload.json</span> file:</p>
<table id="modeldownload-table">
<tr>
<th>Key</th>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td><span class="key">"base_path"</span></td>
<td>"models"</td>
<td>Sets local model base path for API Local and XTTSv2 Local.</td>
</tr>
<tr>
<td><span class="key">"model_path"</span></td>
<td>"xttsv2_2.0.2"</td>
<td>Sets local model folder for API Local and XTTSv2 Local below the base path.</td>
</tr>
<tr>
<td><span class="key">"files_to_download"</span></td>
<td>
<table>
<tr>
<th>File</th>
<th>Download URL</th>
</tr>
<tr>
<td>"LICENSE.txt"</td>
<td><span style="color: #333399;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true</span></td>
</tr>
<tr>
<td>"README.md"</td>
<td><span style="color: #333399;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true</span></td>
</tr>
<tr>
<td>"config.json"</td>
<td><span style="color: #333399;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true</span></td>
</tr>
<tr>
<td>"model.pth"</td>
<td><span style="color: #333399;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true</span></td>
</tr>
<tr>
<td>"vocab.json"</td>
<td><span style="color: #333399;">https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true</span></td>
</tr>
</table>
</td>
<td>Sets the model files required to be downloaded into &bsol;base_path&bsol;model_path&bsol; and where to download them from.</td>
</tr>
</table>
<h2 id="curl-commands"><strong>JSON calls &amp; CURL Commands</strong></h2>
<h4>Generating TTS - Linux</h4>
<p style="padding-left: 30px;"><span style="color: #3366ff;">curl -X POST -H "Content-Type: application/json" -d '{"text": "<span style="color: #ff9900;">This is text to generate as TTS</span>","voice": "<span style="color: #ff9900;">female_01.wav</span>", "language": "<span style="color: #ff9900;">en</span>", "output_file": "<span style="color: #ff9900;">outputfile.wav</span>"}' "http://127.0.0.1:7851/api/generate"</span></p>
<h4>Generating TTS - Windows</h4>
<p style="padding-left: 30px;"><span style="color: #3366ff;">curl -X POST -H "Content-Type: application/json" -d "{&bsol;"text&bsol;": &bsol;"<span style="color: #ff9900;">This is text to generate as TTS</span>&bsol;", &bsol;"voice&bsol;": &bsol;"<span style="color: #ff9900;">female_01.wav</span>&bsol;", &bsol;"language&bsol;": &bsol;"<span style="color: #ff9900;">en</span>&bsol;", &bsol;"output_file&bsol;": &bsol;"<span style="color: #ff9900;">outputfile.wav</span>&bsol;"}" http://127.0.0.1:7851/api/generate</span></p>
<h4>Generating TTS - Notes</h4>
<p style="padding-left: 30px;">Replace <span style="color: #ff9900;">This is text to generate as TTS</span> with whatever you want it to say. <span style="color: #ff9900;">female_01.wav</span> with the voice sample you want to use. <span style="color: #ff9900;">output_file.wav</span> with the file name you want it to create.</p>
<p style="padding-left: 30px;">JSON return <span style="color: #339966;">{"status":"generate-success","data":{"audio_path":"outputfile.wav"}}</span></p>
<h4>Switching Model</h4>
<p style="padding-left: 30px;"><span style="color: #3366ff;">curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20Local"</span><br /><span style="color: #3366ff;"> curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20TTS"</span><br /><span style="color: #3366ff;"> curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=XTTSv2%20Local"</span></p>
<p style="padding-left: 30px;">Switch between the 3 models respectively.</p>
<p style="padding-left: 30px;">JSON return <span style="color: #339966;">{"status": "model-success"}</span></p>
<h4>Switch DeepSpeed</h4>
<p style="padding-left: 30px;"><span style="color: #3366ff;">curl -X POST -H "Content-Type: application/json" "http://127.0.0.1:7851/api/deepspeed?new_deepspeed_value=True"</span></p>
<p style="padding-left: 30px;">Replace True with False to disable DeepSpeed mode.</p>
<p style="padding-left: 30px;">JSON return <span style="color: #339966;">{"status": "deepspeed-success"}</span></p>
<h4>Switching Low VRAM</h4>
<p style="padding-left: 30px;"><span style="color: #3366ff;">curl -X POST -H "Content-Type: application/json" "http://127.0.0.1:7851/api/lowvramsetting?new_low_vram_value=True"</span></p>
<p style="padding-left: 30px;">Replace True with False to disable Low VRAM mode.</p>
<p style="padding-left: 30px;">JSON return <span style="color: #339966;">{"status": "lowvram-success"}</span></p>
<p><a href="#toc">Back to top of page<br /></a></p>
<h2 id="debugging-and-tts-generation-information"><strong>Debugging and TTS Generation Information</strong></h2>
<p style="padding-left: 30px; text-align: justify;">Command line outputs are more verbose to assist in understanding backend processes and debugging.</p>
<p style="padding-left: 30px; text-align: justify;">Its possible during startup you can get a warning message such as: <br /><br /><span style="color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[AllTalk Startup]</span> <span style="color: #ff0000;">Warning</span> <span style="color: black;">TTS Subprocess has NOT started up yet, Will keep trying for 60 seconds maximum</span> <br /><br />This is normal behavior 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 60 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</p>
<p style="padding-left: 30px; text-align: justify;">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 configuration details.</p>
<p style="padding-left: 30px;"><a href="#toc">Back to top of page</a></p>
<h2 id="references"><strong>Thanks &amp; References</strong></h2>
<h4>Coqui TTS Engine</h4>
<ul>
<li><a href="https://coqui.ai/cpml.txt" target="_blank" rel="noopener">Coqui License</a></li>
<li><a href="https://github.com/coqui-ai/TTS" target="_blank" rel="noopener">Coqui TTS GitHub Repository</a></li>
</ul>
<h4>Extension coded by</h4>
<ul>
<li><a href="https://github.com/erew123" target="_blank" rel="noopener">Erew123 GitHub Profile</a></li>
</ul>
<h4>Thanks to &amp; Text generation webUI</h4>
<ul>
<li><a href="https://github.com/oobabooga/text-generation-webui" target="_blank" rel="noopener">Ooobabooga GitHub Repository</a> (Portions of orginal Coquii_TTS extension)</li>
</ul>
<h4>Thanks to</h4>
<ul>
<li><a href="https://github.com/daswer123" target="_blank" rel="noopener">daswer123 GitHub Profile</a> (Assistance with cuda to cpu moving)</li>
<li><a href="https://github.com/S95Sedan" target="_blank" rel="noopener">S95Sedan GitHub Profile</a> (Editing the Microsoft DeepSpeed v11.x installation files so they work)</li>
<li><a href="https://github.com/kanttouchthis" target="_blank" rel="noopener">kanttouchthis GitHub Profile</a> (Portions of orginal Coquii_TTS extension)</li>
<li><a href="https://github.com/Wuzzooy" target="_blank" rel="noopener">Wuzzooy GitHub Profile</a> (Trying out the code while in development)</li>
</ul>
<p><a href="#toc">Back to top of page</a></p>
</body> </body>