Delete system/TGWUI Extension directory
Had to change dir to TGWUI_Extension to support import via script.py
This commit is contained in:
1 parent
c13dd9ddd7
commit
18b580db04
9 files changed
-1478
No files matched your search
@@ -1,17 +0,0 @@
|
|||||||
Text-generation-webui remote extension for AllTalk!
|
|
||||||
|
|
||||||
This folder contains everything you need to set up a Text-generation-webui extension that can communicate with an AllTalk server remotely.
|
|
||||||
|
|
||||||
To get started, follow these simple steps:
|
|
||||||
|
|
||||||
1) In your Text-generation-webui's extensions folder, create a new folder and name it "alltalk_tts".
|
|
||||||
2) Take all the files from this current folder and copy them into the newly created "alltalk_tts" folder.
|
|
||||||
3) Start & Open Text-generation-webui and look for "alltalk_tts" in the list of extensions. Select alltalk_tts, save your settings and restart Text-generation-webui.
|
|
||||||
4) Text-generation-webui will restart and load the AllTalk extension. You may see an error/warning as the extension will not yet have the IP address details of your remote AllTalk server.
|
|
||||||
5) In the extension settings, enter the correct IP address and port of your AllTalk server. If your AllTalk server is running on a remote machine accessed through a secure tunnel, make sure to use "https" instead of "http".
|
|
||||||
6) After entering the server details, click on the "Refresh settings & voices" button. If the settings are correct, the extension will download all the available settings from the AllTalk server.
|
|
||||||
7) The first time you successfully generate speech using the extension, the settings will be automatically saved to a local configuration file.
|
|
||||||
|
|
||||||
Please note that if the AllTalk server you're connected to doesn't support certain settings/features, those options will be greyed out and unavailable in the extension.
|
|
||||||
|
|
||||||
Please use the "Refresh settings & voices" button to make sure the extension is in sync with your AllTalk server.
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,720 +0,0 @@
|
|||||||
The birch canoe slid on the smooth planks.
|
|
||||||
Glue the sheet to the dark blue background.
|
|
||||||
It's easy to tell the depth of a well.
|
|
||||||
These days a chicken leg is a rare dish.
|
|
||||||
Rice is often served in round bowls.
|
|
||||||
The juice of lemons makes fine punch.
|
|
||||||
The box was thrown beside the parked truck.
|
|
||||||
The hogs were fed chopped corn and garbage.
|
|
||||||
Four hours of steady work faced us.
|
|
||||||
A large size in stockings is hard to sell.
|
|
||||||
The boy was there when the sun rose.
|
|
||||||
A rod is used to catch pink salmon.
|
|
||||||
The source of the huge river is the clear spring.
|
|
||||||
Kick the ball straight and follow through.
|
|
||||||
Help the woman get back to her feet.
|
|
||||||
A pot of tea helps to pass the evening.
|
|
||||||
Smoky fires lack flame and heat.
|
|
||||||
The soft cushion broke the man's fall.
|
|
||||||
The salt breeze came across from the sea.
|
|
||||||
The girl at the booth sold fifty bonds.
|
|
||||||
The small pup gnawed a hole in the sock.
|
|
||||||
The fish twisted and turned on the bent hook.
|
|
||||||
Press the pants and sew a button on the vest.
|
|
||||||
The swan dive was far short of perfect.
|
|
||||||
The beauty of the view stunned the young boy.
|
|
||||||
Two blue fish swam in the tank.
|
|
||||||
Her purse was full of useless trash.
|
|
||||||
The colt reared and threw the tall rider.
|
|
||||||
It snowed, rained, and hailed the same morning.
|
|
||||||
Read verse out loud for pleasure.
|
|
||||||
Hoist the load to your left shoulder.
|
|
||||||
Take the winding path to reach the lake.
|
|
||||||
Note closely the size of the gas tank.
|
|
||||||
Wipe the grease off his dirty face.
|
|
||||||
Mend the coat before you go out.
|
|
||||||
The wrist was badly strained and hung limp.
|
|
||||||
The stray cat gave birth to kittens.
|
|
||||||
The young girl gave no clear response.
|
|
||||||
The meal was cooked before the bell rang.
|
|
||||||
What joy there is in living.
|
|
||||||
A king ruled the state in the early days.
|
|
||||||
The ship was torn apart on the sharp reef.
|
|
||||||
Sickness kept him home the third week.
|
|
||||||
The wide road shimmered in the hot sun.
|
|
||||||
The lazy cow lay in the cool grass.
|
|
||||||
Lift the square stone over the fence.
|
|
||||||
The rope will bind the seven books at once.
|
|
||||||
Hop over the fence and plunge in.
|
|
||||||
The friendly gang left the drug store.
|
|
||||||
Mesh wire keeps chicks inside.
|
|
||||||
The frosty air passed through the coat.
|
|
||||||
The crooked maze failed to fool the mouse.
|
|
||||||
Adding fast leads to wrong sums.
|
|
||||||
The show was a flop from the very start.
|
|
||||||
A saw is a tool used for making boards.
|
|
||||||
The wagon moved on well oiled wheels.
|
|
||||||
March the soldiers past the next hill.
|
|
||||||
A cup of sugar makes sweet fudge.
|
|
||||||
Place a rosebush near the porch steps.
|
|
||||||
Both lost their lives in the raging storm.
|
|
||||||
We talked of the side show in the circus.
|
|
||||||
Use a pencil to write the first draft.
|
|
||||||
He ran half way to the hardware store.
|
|
||||||
The clock struck to mark the third period.
|
|
||||||
A small creek cut across the field.
|
|
||||||
Cars and busses stalled in snow drifts.
|
|
||||||
The set of china hit the floor with a crash.
|
|
||||||
This is a grand season for hikes on the road.
|
|
||||||
The dune rose from the edge of the water.
|
|
||||||
Those words were the cue for the actor to leave.
|
|
||||||
A yacht slid around the point into the bay.
|
|
||||||
The two met while playing on the sand.
|
|
||||||
The ink stain dried on the finished page.
|
|
||||||
The walled town was seized without a fight.
|
|
||||||
The lease ran out in sixteen weeks.
|
|
||||||
A tame squirrel makes a nice pet.
|
|
||||||
The horn of the car woke the sleeping cop.
|
|
||||||
The heart beat strongly and with firm strokes.
|
|
||||||
The pearl was worn in a thin silver ring.
|
|
||||||
The fruit peel was cut in thick slices.
|
|
||||||
The Navy attacked the big task force.
|
|
||||||
See the cat glaring at the scared mouse.
|
|
||||||
There are more than two factors here.
|
|
||||||
The hat brim was wide and too droopy.
|
|
||||||
The lawyer tried to lose his case.
|
|
||||||
The grass curled around the fence post.
|
|
||||||
Cut the pie into large parts.
|
|
||||||
Men strive but seldom get rich.
|
|
||||||
Always close the barn door tight.
|
|
||||||
He lay prone and hardly moved a limb.
|
|
||||||
The slush lay deep along the street.
|
|
||||||
A wisp of cloud hung in the blue air.
|
|
||||||
A pound of sugar costs more than eggs.
|
|
||||||
The fin was sharp and cut the clear water.
|
|
||||||
The play seems dull and quite stupid.
|
|
||||||
Bail the boat to stop it from sinking.
|
|
||||||
The term ended in late June that year.
|
|
||||||
A tusk is used to make costly gifts.
|
|
||||||
Ten pins were set in order.
|
|
||||||
The bill was paid every third week.
|
|
||||||
Oak is strong and also gives shade.
|
|
||||||
Cats and dogs each hate the other.
|
|
||||||
The pipe began to rust while new.
|
|
||||||
Open the crate but don't break the glass.
|
|
||||||
Add the sum to the product of these three.
|
|
||||||
Thieves who rob friends deserve jail.
|
|
||||||
The ripe taste of cheese improves with age.
|
|
||||||
Act on these orders with great speed.
|
|
||||||
The hog crawled under the high fence.
|
|
||||||
Move the vat over the hot fire.
|
|
||||||
The bark of the pine tree was shiny and dark.
|
|
||||||
Leaves turn brown and yellow in the fall.
|
|
||||||
The pennant waved when the wind blew.
|
|
||||||
Split the log with a quick, sharp blow.
|
|
||||||
Burn peat after the logs give out.
|
|
||||||
He ordered peach pie with ice cream.
|
|
||||||
Weave the carpet on the right hand side.
|
|
||||||
Hemp is a weed found in parts of the tropics.
|
|
||||||
A lame back kept his score low.
|
|
||||||
We find joy in the simplest things.
|
|
||||||
Type out three lists of orders.
|
|
||||||
The harder he tried the less he got done.
|
|
||||||
The boss ran the show with a watchful eye.
|
|
||||||
The cup cracked and spilled its contents.
|
|
||||||
Paste can cleanse the most dirty brass.
|
|
||||||
The slang word for raw whiskey is booze.
|
|
||||||
It caught its hind paw in a rusty trap.
|
|
||||||
The wharf could be seen at the farther shore.
|
|
||||||
Feel the heat of the weak dying flame.
|
|
||||||
The tiny girl took off her hat.
|
|
||||||
A cramp is no small danger on a swim.
|
|
||||||
He said the same phrase thirty times.
|
|
||||||
Pluck the bright rose without leaves.
|
|
||||||
Two plus seven is less than ten.
|
|
||||||
The glow deepened in the eyes of the sweet girl.
|
|
||||||
Bring your problems to the wise chief.
|
|
||||||
Write a fond note to the friend you cherish.
|
|
||||||
Clothes and lodging are free to new men.
|
|
||||||
We frown when events take a bad turn.
|
|
||||||
Port is a strong wine with a smoky taste.
|
|
||||||
The young kid jumped the rusty gate.
|
|
||||||
Guess the results from the first scores.
|
|
||||||
A salt pickle tastes fine with ham.
|
|
||||||
The just claim got the right verdict.
|
|
||||||
These thistles bend in a high wind.
|
|
||||||
Pure bred poodles have curls.
|
|
||||||
The tree top waved in a graceful way.
|
|
||||||
The spot on the blotter was made by green ink.
|
|
||||||
Mud was spattered on the front of his white shirt.
|
|
||||||
The cigar burned a hole in the desk top.
|
|
||||||
The empty flask stood on the tin tray.
|
|
||||||
A speedy man can beat this track mark.
|
|
||||||
He broke a new shoelace that day.
|
|
||||||
The coffee stand is too high for the couch.
|
|
||||||
The urge to write short stories is rare.
|
|
||||||
The pencils have all been used.
|
|
||||||
The pirates seized the crew of the lost ship.
|
|
||||||
We tried to replace the coin but failed.
|
|
||||||
She sewed the torn coat quite neatly.
|
|
||||||
The sofa cushion is red and of light weight.
|
|
||||||
The jacket hung on the back of the wide chair.
|
|
||||||
At that high level the air is pure.
|
|
||||||
Drop the two when you add the figures.
|
|
||||||
A filing case is now hard to buy.
|
|
||||||
An abrupt start does not win the prize.
|
|
||||||
Wood is best for making toys and blocks.
|
|
||||||
The office paint was a dull, sad tan.
|
|
||||||
He knew the skill of the great young actress.
|
|
||||||
A rag will soak up spilled water.
|
|
||||||
A shower of dirt fell from the hot pipes.
|
|
||||||
Steam hissed from the broken valve.
|
|
||||||
The child almost hurt the small dog.
|
|
||||||
There was a sound of dry leaves outside.
|
|
||||||
The sky that morning was clear and bright blue.
|
|
||||||
Torn scraps littered the stone floor.
|
|
||||||
Sunday is the best part of the week.
|
|
||||||
The doctor cured him with these pills.
|
|
||||||
The new girl was fired today at noon.
|
|
||||||
They felt gay when the ship arrived in port.
|
|
||||||
Add the store's account to the last cent.
|
|
||||||
Acid burns holes in wool cloth.
|
|
||||||
Fairy tales should be fun to write.
|
|
||||||
Eight miles of woodland burned to waste.
|
|
||||||
The third act was dull and tired the players.
|
|
||||||
A young child should not suffer fright.
|
|
||||||
Add the column and put the sum here.
|
|
||||||
We admire and love a good cook.
|
|
||||||
There the flood mark is ten inches.
|
|
||||||
He carved a head from the round block of marble.
|
|
||||||
She has a smart way of wearing clothes.
|
|
||||||
The fruit of a fig tree is apple-shaped.
|
|
||||||
Corn cobs can be used to kindle a fire.
|
|
||||||
Where were they when the noise started.
|
|
||||||
The paper box is full of thumb tacks.
|
|
||||||
Sell your gift to a buyer at a good gain.
|
|
||||||
The tongs lay beside the ice pail.
|
|
||||||
The petals fall with the next puff of wind.
|
|
||||||
Bring your best compass to the third class.
|
|
||||||
They could laugh although they were sad.
|
|
||||||
Farmers came in to thresh the oat crop.
|
|
||||||
The brown house was on fire to the attic.
|
|
||||||
The lure is used to catch trout and flounder.
|
|
||||||
Float the soap on top of the bath water.
|
|
||||||
A blue crane is a tall wading bird.
|
|
||||||
A fresh start will work such wonders.
|
|
||||||
The club rented the rink for the fifth night.
|
|
||||||
After the dance, they went straight home.
|
|
||||||
The hostess taught the new maid to serve.
|
|
||||||
He wrote his last novel there at the inn.
|
|
||||||
Even the worst will beat his low score.
|
|
||||||
The cement had dried when he moved it.
|
|
||||||
The loss of the second ship was hard to take.
|
|
||||||
The fly made its way along the wall.
|
|
||||||
Do that with a wooden stick.
|
|
||||||
Live wires should be kept covered.
|
|
||||||
The large house had hot water taps.
|
|
||||||
It is hard to erase blue or red ink.
|
|
||||||
Write at once or you may forget it.
|
|
||||||
The doorknob was made of bright clean brass.
|
|
||||||
The wreck occurred by the bank on Main Street.
|
|
||||||
A pencil with black lead writes best.
|
|
||||||
Coax a young calf to drink from a bucket.
|
|
||||||
Schools for ladies teach charm and grace.
|
|
||||||
The lamp shone with a steady green flame.
|
|
||||||
They took the axe and the saw to the forest.
|
|
||||||
The ancient coin was quite dull and worn.
|
|
||||||
The shaky barn fell with a loud crash.
|
|
||||||
Jazz and swing fans like fast music.
|
|
||||||
Rake the rubbish up and then burn it.
|
|
||||||
Slash the gold cloth into fine ribbons.
|
|
||||||
Try to have the court decide the case.
|
|
||||||
They are pushed back each time they attack.
|
|
||||||
He broke his ties with groups of former friends.
|
|
||||||
They floated on the raft to sun their white backs.
|
|
||||||
The map had an X that meant nothing.
|
|
||||||
Whitings are small fish caught in nets.
|
|
||||||
Some ads serve to cheat buyers.
|
|
||||||
Jerk the rope and the bell rings weakly.
|
|
||||||
A waxed floor makes us lose balance.
|
|
||||||
Madam, this is the best brand of corn.
|
|
||||||
On the islands the sea breeze is soft and mild.
|
|
||||||
The play began as soon as we sat down.
|
|
||||||
This will lead the world to more sound and fury.
|
|
||||||
Add salt before you fry the egg.
|
|
||||||
The rush for funds reached its peak Tuesday.
|
|
||||||
The birch looked stark white and lonesome.
|
|
||||||
The box is held by a bright red snapper.
|
|
||||||
To make pure ice, you freeze water.
|
|
||||||
The first worm gets snapped early.
|
|
||||||
Jump the fence and hurry up the bank.
|
|
||||||
Yell and clap as the curtain slides back.
|
|
||||||
They are men who walk the middle of the road.
|
|
||||||
Both brothers wear the same size.
|
|
||||||
In some form or other we need fun.
|
|
||||||
The prince ordered his head chopped off.
|
|
||||||
The houses are built of red clay bricks.
|
|
||||||
Ducks fly north but lack a compass.
|
|
||||||
Fruit flavors are used in fizz drinks.
|
|
||||||
These pills do less good than others.
|
|
||||||
Canned pears lack full flavor.
|
|
||||||
The dark pot hung in the front closet.
|
|
||||||
Carry the pail to the wall and spill it there.
|
|
||||||
The train brought our hero to the big town.
|
|
||||||
We are sure that one war is enough.
|
|
||||||
Gray paint stretched for miles around.
|
|
||||||
The rude laugh filled the empty room.
|
|
||||||
High seats are best for football fans.
|
|
||||||
Tea served from the brown jug is tasty.
|
|
||||||
A dash of pepper spoils beef stew.
|
|
||||||
A zestful food is the hot-cross bun.
|
|
||||||
The horse trotted around the field at a brisk pace.
|
|
||||||
Find the twin who stole the pearl necklace.
|
|
||||||
Cut the cord that binds the box tightly.
|
|
||||||
The red tape bound the smuggled food.
|
|
||||||
Look in the corner to find the tan shirt.
|
|
||||||
The cold drizzle will halt the bond drive.
|
|
||||||
Nine men were hired to dig the ruins.
|
|
||||||
The junk yard had a mouldy smell.
|
|
||||||
The flint sputtered and lit a pine torch.
|
|
||||||
Soak the cloth and drown the sharp odor.
|
|
||||||
The shelves were bare of both jam or crackers.
|
|
||||||
A joy to every child is the swan boat.
|
|
||||||
All sat frozen and watched the screen.
|
|
||||||
A cloud of dust stung his tender eyes.
|
|
||||||
To reach the end he needs much courage.
|
|
||||||
Shape the clay gently into block form.
|
|
||||||
A ridge on a smooth surface is a bump or flaw.
|
|
||||||
Hedge apples may stain your hands green.
|
|
||||||
Quench your thirst, then eat the crackers.
|
|
||||||
Tight curls get limp on rainy days.
|
|
||||||
The mute muffled the high tones of the horn.
|
|
||||||
The gold ring fits only a pierced ear.
|
|
||||||
The old pan was covered with hard fudge.
|
|
||||||
Watch the log float in the wide river.
|
|
||||||
The node on the stalk of wheat grew daily.
|
|
||||||
The heap of fallen leaves was set on fire.
|
|
||||||
Write fast if you want to finish early.
|
|
||||||
His shirt was clean but one button was gone.
|
|
||||||
The barrel of beer was a brew of malt and hops.
|
|
||||||
Tin cans are absent from store shelves.
|
|
||||||
Slide the box into that empty space.
|
|
||||||
The plant grew large and green in the window.
|
|
||||||
The beam dropped down on the workmen's head.
|
|
||||||
Pink clouds floated with the breeze.
|
|
||||||
She danced like a swan, tall and graceful.
|
|
||||||
The tube was blown and the tire flat and useless.
|
|
||||||
It is late morning on the old wall clock.
|
|
||||||
Let's all join as we sing the last chorus.
|
|
||||||
The last switch cannot be turned off.
|
|
||||||
The fight will end in just six minutes.
|
|
||||||
The store walls were lined with colored frocks.
|
|
||||||
The peace league met to discuss their plans.
|
|
||||||
The rise to fame of a person takes luck.
|
|
||||||
Paper is scarce, so write with much care.
|
|
||||||
The quick fox jumped on the sleeping cat.
|
|
||||||
The nozzle of the fire hose was bright brass.
|
|
||||||
Screw the round cap on as tight as needed.
|
|
||||||
Time brings us many changes.
|
|
||||||
The purple tie was ten years old.
|
|
||||||
Men think and plan and sometimes act.
|
|
||||||
Fill the ink jar with sticky glue.
|
|
||||||
He smoke a big pipe with strong contents.
|
|
||||||
We need grain to keep our mules healthy.
|
|
||||||
Pack the records in a neat thin case.
|
|
||||||
The crunch of feet in the snow was the only sound.
|
|
||||||
The copper bowl shone in the sun's rays.
|
|
||||||
Boards will warp unless kept dry.
|
|
||||||
The plush chair leaned against the wall.
|
|
||||||
Glass will clink when struck by metal.
|
|
||||||
Bathe and relax in the cool green grass.
|
|
||||||
Nine rows of soldiers stood in line.
|
|
||||||
The beach is dry and shallow at low tide.
|
|
||||||
The idea is to sew both edges straight.
|
|
||||||
The kitten chased the dog down the street.
|
|
||||||
Pages bound in cloth make a book.
|
|
||||||
Try to trace the fine lines of the painting.
|
|
||||||
Women form less than half of the group.
|
|
||||||
The zones merge in the central part of town.
|
|
||||||
A gem in the rough needs work to polish.
|
|
||||||
Code is used when secrets are sent.
|
|
||||||
Most of the news is easy for us to hear.
|
|
||||||
He used the lathe to make brass objects.
|
|
||||||
The vane on top of the pole revolved in the wind.
|
|
||||||
Mince pie is a dish served to children.
|
|
||||||
The clan gathered on each dull night.
|
|
||||||
Let it burn, it gives us warmth and comfort.
|
|
||||||
A castle built from sand fails to endure.
|
|
||||||
A child's wit saved the day for us.
|
|
||||||
Tack the strip of carpet to the worn floor.
|
|
||||||
Next Tuesday we must vote.
|
|
||||||
Pour the stew from the pot into the plate.
|
|
||||||
Each penny shone like new.
|
|
||||||
The man went to the woods to gather sticks.
|
|
||||||
The dirt piles were lines along the road.
|
|
||||||
The logs fell and tumbled into the clear stream.
|
|
||||||
Just hoist it up and take it away.
|
|
||||||
A ripe plum is fit for a king's palate.
|
|
||||||
Our plans right now are hazy.
|
|
||||||
Brass rings are sold by these natives.
|
|
||||||
It takes a good trap to capture a bear.
|
|
||||||
Feed the white mouse some flower seeds.
|
|
||||||
The thaw came early and freed the stream.
|
|
||||||
He took the lead and kept it the whole distance.
|
|
||||||
The key you designed will fit the lock.
|
|
||||||
Plead to the council to free the poor thief.
|
|
||||||
Better hash is made of rare beef.
|
|
||||||
This plank was made for walking on.
|
|
||||||
The lake sparkled in the red hot sun.
|
|
||||||
He crawled with care along the ledge.
|
|
||||||
Tend the sheep while the dog wanders.
|
|
||||||
It takes a lot of help to finish these.
|
|
||||||
Mark the spot with a sign painted red.
|
|
||||||
Take two shares as a fair profit.
|
|
||||||
The fur of cats goes by many names.
|
|
||||||
North winds bring colds and fevers.
|
|
||||||
He asks no person to vouch for him.
|
|
||||||
Go now and come here later.
|
|
||||||
A sash of gold silk will trim her dress.
|
|
||||||
Soap can wash most dirt away.
|
|
||||||
That move means the game is over.
|
|
||||||
He wrote down a long list of items.
|
|
||||||
A siege will crack the strong defense.
|
|
||||||
Grape juice and water mix well.
|
|
||||||
Roads are paved with sticky tar.
|
|
||||||
Fake stones shine but cost little.
|
|
||||||
The drip of the rain made a pleasant sound.
|
|
||||||
Smoke poured out of every crack.
|
|
||||||
Serve the hot rum to the tired heroes.
|
|
||||||
Much of the story makes good sense.
|
|
||||||
The sun came up to light the eastern sky.
|
|
||||||
Heave the line over the port side.
|
|
||||||
A lathe cuts and trims any wood.
|
|
||||||
It's a dense crowd in two distinct ways.
|
|
||||||
His hip struck the knee of the next player.
|
|
||||||
The stale smell of old beer lingers.
|
|
||||||
The desk was firm on the shaky floor.
|
|
||||||
It takes heat to bring out the odor.
|
|
||||||
Beef is scarcer than some lamb.
|
|
||||||
Raise the sail and steer the ship northward.
|
|
||||||
A cone costs five cents on Mondays.
|
|
||||||
A pod is what peas always grow in.
|
|
||||||
Jerk the dart from the cork target.
|
|
||||||
No cement will hold hard wood.
|
|
||||||
We now have a new base for shipping.
|
|
||||||
A list of names is carved around the base.
|
|
||||||
The sheep were led home by a dog.
|
|
||||||
Three for a dime, the young peddler cried.
|
|
||||||
The sense of smell is better than that of touch.
|
|
||||||
No hardship seemed to keep him sad.
|
|
||||||
Grace makes up for lack of beauty.
|
|
||||||
Nudge gently but wake her now.
|
|
||||||
The news struck doubt into restless minds.
|
|
||||||
Once we stood beside the shore.
|
|
||||||
A chink in the wall allowed a draft to blow.
|
|
||||||
Fasten two pins on each side.
|
|
||||||
A cold dip restores health and zest.
|
|
||||||
He takes the oath of office each March.
|
|
||||||
The sand drifts over the sill of the old house.
|
|
||||||
The point of the steel pen was bent and twisted.
|
|
||||||
There is a lag between thought and act.
|
|
||||||
Seed is needed to plant the spring corn.
|
|
||||||
Draw the chart with heavy black lines.
|
|
||||||
The boy owed his pal thirty cents.
|
|
||||||
The chap slipped into the crowd and was lost.
|
|
||||||
Hats are worn to tea and not to dinner.
|
|
||||||
The ramp led up to the wide highway.
|
|
||||||
Beat the dust from the rug onto the lawn.
|
|
||||||
Say it slowly but make it ring clear.
|
|
||||||
The straw nest housed five robins.
|
|
||||||
Screen the porch with woven straw mats.
|
|
||||||
This horse will nose his way to the finish.
|
|
||||||
The dry wax protects the deep scratch.
|
|
||||||
He picked up the dice for a second roll.
|
|
||||||
These coins will be needed to pay his debt.
|
|
||||||
The nag pulled the frail cart along.
|
|
||||||
Twist the valve and release hot steam.
|
|
||||||
The vamp of the shoe had a gold buckle.
|
|
||||||
The smell of burned rags itches my nose.
|
|
||||||
New pants lack cuffs and pockets.
|
|
||||||
The marsh will freeze when cold enough.
|
|
||||||
They slice the sausage thin with a knife.
|
|
||||||
The bloom of the rose lasts a few days.
|
|
||||||
A gray mare walked before the colt.
|
|
||||||
Breakfast buns are fine with a hot drink.
|
|
||||||
Bottles hold four kinds of rum.
|
|
||||||
The man wore a feather in his felt hat.
|
|
||||||
He wheeled the bike past the winding road.
|
|
||||||
Drop the ashes on the worn old rug.
|
|
||||||
The desk and both chairs were painted tan.
|
|
||||||
Throw out the used paper cup and plate.
|
|
||||||
A clean neck means a neat collar.
|
|
||||||
The couch cover and hall drapes were blue.
|
|
||||||
The stems of the tall glasses cracked and broke.
|
|
||||||
The wall phone rang loud and often.
|
|
||||||
The clothes dried on a thin wooden rack.
|
|
||||||
Turn on the lantern which gives us light.
|
|
||||||
The cleat sank deeply into the soft turf.
|
|
||||||
The bills were mailed promptly on the tenth of the month.
|
|
||||||
To have is better than to wait and hope.
|
|
||||||
The price is fair for a good antique clock.
|
|
||||||
The music played on while they talked.
|
|
||||||
Dispense with a vest on a day like this.
|
|
||||||
The bunch of grapes was pressed into wine.
|
|
||||||
He sent the figs, but kept the ripe cherries.
|
|
||||||
The hinge on the door creaked with old age.
|
|
||||||
The screen before the fire kept in the sparks.
|
|
||||||
Fly by night, and you waste little time.
|
|
||||||
Thick glasses helped him read the print.
|
|
||||||
Birth and death mark the limits of life.
|
|
||||||
The chair looked strong but had no bottom.
|
|
||||||
The kite flew wildly in the high wind.
|
|
||||||
A fur muff is stylish once more.
|
|
||||||
The tin box held priceless stones.
|
|
||||||
We need an end of all such matter.
|
|
||||||
The case was puzzling to the old and wise.
|
|
||||||
The bright lanterns were gay on the dark lawn.
|
|
||||||
We don't get much money but we have fun.
|
|
||||||
The youth drove with zest, but little skill.
|
|
||||||
Five years he lived with a shaggy dog.
|
|
||||||
A fence cuts through the corner lot.
|
|
||||||
The way to save money is not to spend much.
|
|
||||||
Shut the hatch before the waves push it in.
|
|
||||||
The odor of spring makes young hearts jump.
|
|
||||||
Crack the walnut with your sharp side teeth.
|
|
||||||
He offered proof in the form of a large chart.
|
|
||||||
Send the stuff in a thick paper bag.
|
|
||||||
A quart of milk is water for the most part.
|
|
||||||
They told wild tales to frighten him.
|
|
||||||
The three story house was built of stone.
|
|
||||||
In the rear of the ground floor was a large passage.
|
|
||||||
A man in a blue sweater sat at the desk.
|
|
||||||
Oats are a food eaten by horse and man.
|
|
||||||
Their eyelids droop for want of sleep.
|
|
||||||
A sip of tea revives his tired friend.
|
|
||||||
There are many ways to do these things.
|
|
||||||
Tuck the sheet under the edge of the mat.
|
|
||||||
A force equal to that would move the earth.
|
|
||||||
We like to see clear weather.
|
|
||||||
The work of the tailor is seen on each side.
|
|
||||||
Take a chance and win a china doll.
|
|
||||||
Shake the dust from your shoes, stranger.
|
|
||||||
She was kind to sick old people.
|
|
||||||
The square wooden crate was packed to be shipped.
|
|
||||||
The dusty bench stood by the stone wall.
|
|
||||||
We dress to suit the weather of most days.
|
|
||||||
Smile when you say nasty words.
|
|
||||||
A bowl of rice is free with chicken stew.
|
|
||||||
The water in this well is a source of good health.
|
|
||||||
Take shelter in this tent, but keep still.
|
|
||||||
That guy is the writer of a few banned books.
|
|
||||||
The little tales they tell are false.
|
|
||||||
The door was barred, locked, and bolted as well.
|
|
||||||
Ripe pears are fit for a queen's table.
|
|
||||||
A big wet stain was on the round carpet.
|
|
||||||
The kite dipped and swayed, but stayed aloft.
|
|
||||||
The pleasant hours fly by much too soon.
|
|
||||||
The room was crowded with a wild mob.
|
|
||||||
This strong arm shall shield your honor.
|
|
||||||
She blushed when he gave her a white orchid.
|
|
||||||
The beetle droned in the hot June sun.
|
|
||||||
Press the pedal with your left foot.
|
|
||||||
Neat plans fail without luck.
|
|
||||||
The black trunk fell from the landing.
|
|
||||||
The bank pressed for payment of the debt.
|
|
||||||
The theft of the pearl pin was kept secret.
|
|
||||||
Shake hands with this friendly child.
|
|
||||||
The vast space stretched into the far distance.
|
|
||||||
A rich farm is rare in this sandy waste.
|
|
||||||
His wide grin earned many friends.
|
|
||||||
Flax makes a fine brand of paper.
|
|
||||||
Hurdle the pit with the aid of a long pole.
|
|
||||||
A strong bid may scare your partner stiff.
|
|
||||||
Even a just cause needs power to win.
|
|
||||||
Peep under the tent and see the clowns.
|
|
||||||
The leaf drifts along with a slow spin.
|
|
||||||
Cheap clothes are flashy but don't last.
|
|
||||||
A thing of small note can cause despair.
|
|
||||||
Flood the mails with requests for this book.
|
|
||||||
A thick coat of black paint covered all.
|
|
||||||
The pencil was cut to be sharp at both ends.
|
|
||||||
Those last words were a strong statement.
|
|
||||||
He wrote his name boldly at the top of the sheet.
|
|
||||||
Dill pickles are sour but taste fine.
|
|
||||||
Down that road is the way to the grain farmer.
|
|
||||||
Either mud or dust are found at all times.
|
|
||||||
The best method is to fix it in place with clips.
|
|
||||||
If you mumble your speech will be lost.
|
|
||||||
At night the alarm roused him from a deep sleep.
|
|
||||||
Read just what the meter says.
|
|
||||||
Fill your pack with bright trinkets for the poor.
|
|
||||||
The small red neon lamp went out.
|
|
||||||
Clams are small, round, soft, and tasty.
|
|
||||||
The fan whirled its round blades softly.
|
|
||||||
The line where the edges join was clean.
|
|
||||||
Breathe deep and smell the piny air.
|
|
||||||
It matters not if he reads these words or those.
|
|
||||||
A brown leather bag hung from its strap.
|
|
||||||
A toad and a frog are hard to tell apart.
|
|
||||||
A white silk jacket goes with any shoes.
|
|
||||||
A break in the dam almost caused a flood.
|
|
||||||
Paint the sockets in the wall dull green.
|
|
||||||
The child crawled into the dense grass.
|
|
||||||
Bribes fail where honest men work.
|
|
||||||
Trample the spark, else the flames will spread.
|
|
||||||
The hilt of the sword was carved with fine designs.
|
|
||||||
A round hole was drilled through the thin board.
|
|
||||||
Footprints showed the path he took up the beach.
|
|
||||||
She was waiting at my front lawn.
|
|
||||||
A vent near the edge brought in fresh air.
|
|
||||||
Prod the old mule with a crooked stick.
|
|
||||||
It is a band of steel three inches wide.
|
|
||||||
The pipe ran almost the length of the ditch.
|
|
||||||
It was hidden from sight by a mass of leaves and shrubs.
|
|
||||||
The weight of the package was seen on the high scale.
|
|
||||||
Wake and rise, and step into the green outdoors.
|
|
||||||
The green light in the brown box flickered.
|
|
||||||
The brass tube circled the high wall.
|
|
||||||
The lobes of her ears were pierced to hold rings.
|
|
||||||
Hold the hammer near the end to drive the nail.
|
|
||||||
Next Sunday is the twelfth of the month.
|
|
||||||
Every word and phrase he speaks is true.
|
|
||||||
He put his last cartridge into the gun and fired.
|
|
||||||
They took their kids from the public school.
|
|
||||||
Drive the screw straight into the wood.
|
|
||||||
Keep the hatch tight and the watch constant.
|
|
||||||
Sever the twine with a quick snip of the knife.
|
|
||||||
Paper will dry out when wet.
|
|
||||||
Slide the catch back and open the desk.
|
|
||||||
Help the weak to preserve their strength.
|
|
||||||
A sullen smile gets few friends.
|
|
||||||
Stop whistling and watch the boys march.
|
|
||||||
Jerk the cord, and out tumbles the gold.
|
|
||||||
Slide the tray across the glass top.
|
|
||||||
The cloud moved in a stately way and was gone.
|
|
||||||
Light maple makes for a swell room.
|
|
||||||
Set the piece here and say nothing.
|
|
||||||
Dull stories make her laugh.
|
|
||||||
A stiff cord will do to fasten your shoe.
|
|
||||||
Get the trust fund to the bank early.
|
|
||||||
Choose between the high road and the low.
|
|
||||||
A plea for funds seems to come again.
|
|
||||||
He lent his coat to the tall gaunt stranger.
|
|
||||||
There is a strong chance it will happen once more.
|
|
||||||
The duke left the park in a silver coach.
|
|
||||||
Greet the new guests and leave quickly.
|
|
||||||
When the frost has come it is time for turkey.
|
|
||||||
Sweet words work better than fierce.
|
|
||||||
A thin stripe runs down the middle.
|
|
||||||
A six comes up more often than a ten.
|
|
||||||
Lush fern grow on the lofty rocks.
|
|
||||||
The ram scared the school children off.
|
|
||||||
The team with the best timing looks good.
|
|
||||||
The farmer swapped his horse for a brown ox.
|
|
||||||
Sit on the perch and tell the others what to do.
|
|
||||||
A steep trail is painful for our feet.
|
|
||||||
The early phase of life moves fast.
|
|
||||||
Green moss grows on the northern side.
|
|
||||||
Tea in thin china has a sweet taste.
|
|
||||||
Pitch the straw through the door of the stable.
|
|
||||||
The latch on the back gate needed a nail.
|
|
||||||
The goose was brought straight from the old market.
|
|
||||||
The sink is the thing in which we pile dishes.
|
|
||||||
A whiff of it will cure the most stubborn cold.
|
|
||||||
The facts don't always show who is right.
|
|
||||||
She flaps her cape as she parades the street.
|
|
||||||
The loss of the cruiser was a blow to the fleet.
|
|
||||||
Loop the braid to the left and then over.
|
|
||||||
Plead with the lawyer to drop the lost cause.
|
|
||||||
Calves thrive on tender spring grass.
|
|
||||||
Post no bills on this office wall.
|
|
||||||
Tear a thin sheet from the yellow pad.
|
|
||||||
A cruise in warm waters in a sleek yacht is fun.
|
|
||||||
A streak of color ran down the left edge.
|
|
||||||
It was done before the boy could see it.
|
|
||||||
Crouch before you jump or miss the mark.
|
|
||||||
Pack the kits and don't forget the salt.
|
|
||||||
The square peg will settle in the round hole.
|
|
||||||
Fine soap saves tender skin.
|
|
||||||
Poached eggs and tea must suffice.
|
|
||||||
Bad nerves are jangled by a door slam.
|
|
||||||
Ship maps are different from those for planes.
|
|
||||||
Dimes showered down from all sides.
|
|
||||||
They sang the same tunes at each party.
|
|
||||||
The sky in the west is tinged with orange red.
|
|
||||||
The pods of peas ferment in bare fields.
|
|
||||||
The horse balked and threw the tall rider.
|
|
||||||
The hitch between the horse and cart broke.
|
|
||||||
Pile the coal high in the shed corner.
|
|
||||||
A gold vase is both rare and costly.
|
|
||||||
The knife was hung inside its bright sheath.
|
|
||||||
The rarest spice comes from the far East.
|
|
||||||
The roof should be tilted at a sharp slant.
|
|
||||||
A smatter of French is worse than none.
|
|
||||||
The mule trod the treadmill day and night.
|
|
||||||
The aim of the contest is to raise a great fund.
|
|
||||||
To send it now in large amounts is bad.
|
|
||||||
There is a fine hard tang in salty air.
|
|
||||||
Cod is the main business of the north shore.
|
|
||||||
The slab was hewn from heavy blocks of slate.
|
|
||||||
Dunk the stale biscuits into strong drink.
|
|
||||||
Hang tinsel from both branches.
|
|
||||||
Cap the jar with a tight brass cover.
|
|
||||||
The poor boy missed the boat again.
|
|
||||||
Be sure to set the lamp firmly in the hole.
|
|
||||||
Pick a card and slip it under the pack.
|
|
||||||
A round mat will cover the dull spot.
|
|
||||||
The first part of the plan needs changing.
|
|
||||||
A good book informs of what we ought to know.
|
|
||||||
The mail comes in three batches per day.
|
|
||||||
You cannot brew tea in a cold pot.
|
|
||||||
Dots of light betrayed the black cat.
|
|
||||||
Put the chart on the mantel and tack it down.
|
|
||||||
The night shift men rate extra pay.
|
|
||||||
The red paper brightened the dim stage.
|
|
||||||
See the player scoot to third base.
|
|
||||||
Slide the bill between the two leaves.
|
|
||||||
Many hands help get the job done.
|
|
||||||
We don't like to admit our small faults.
|
|
||||||
No doubt about the way the wind blows.
|
|
||||||
Dig deep in the earth for pirate's gold.
|
|
||||||
The steady drip is worse than a drenching rain.
|
|
||||||
A flat pack takes less luggage space.
|
|
||||||
Green ice frosted the punch bowl.
|
|
||||||
A stuffed chair slipped from the moving van.
|
|
||||||
The stitch will serve but needs to be shortened.
|
|
||||||
A thin book fits in the side pocket.
|
|
||||||
The gloss on top made it unfit to read.
|
|
||||||
The hail pattered on the burnt brown grass.
|
|
||||||
Seven seals were stamped on great sheets.
|
|
||||||
Our troops are set to strike heavy blows.
|
|
||||||
The store was jammed before the sale could start.
|
|
||||||
It was a bad error on the part of the new judge.
|
|
||||||
One step more and the board will collapse.
|
|
||||||
Take the match and strike it against your shoe.
|
|
||||||
The pot boiled, but the contents failed to jell.
|
|
||||||
The baby puts his right foot in his mouth.
|
|
||||||
The bombs left most of the town in ruins.
|
|
||||||
Stop and stare at the hard working man.
|
|
||||||
The streets are narrow and full of sharp turns.
|
|
||||||
The pup jerked the leash as he saw a feline shape.
|
|
||||||
Open your book to the first page.
|
|
||||||
Fish evade the net and swim off.
|
|
||||||
Dip the pail once and let it settle.
|
|
||||||
Will you please answer that phone.
|
|
||||||
The big red apple fell to the ground.
|
|
||||||
The curtain rose and the show was on.
|
|
||||||
The young prince became heir to the throne.
|
|
||||||
He sent the boy on a short errand.
|
|
||||||
Leave now and you will arrive on time.
|
|
||||||
The corner store was robbed last night.
|
|
||||||
A gold ring will please most any girl.
|
|
||||||
The long journey home took a year.
|
|
||||||
She saw a cat in the neighbor's house.
|
|
||||||
A pink shell was found on the sandy beach.
|
|
||||||
Small children came to see him.
|
|
||||||
The grass and bushes were wet with dew.
|
|
||||||
The blind man counted his old coins.
|
|
||||||
A severe storm tore down the barn.
|
|
||||||
She called his name many times.
|
|
||||||
When you hear the bell, come quickly.
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"Arabic": "ar",
|
|
||||||
"Chinese": "zh-cn",
|
|
||||||
"Czech": "cs",
|
|
||||||
"Dutch": "nl",
|
|
||||||
"English": "en",
|
|
||||||
"French": "fr",
|
|
||||||
"German": "de",
|
|
||||||
"Hungarian": "hu",
|
|
||||||
"Italian": "it",
|
|
||||||
"Japanese": "ja",
|
|
||||||
"Korean": "ko",
|
|
||||||
"Polish": "pl",
|
|
||||||
"Portuguese": "pt",
|
|
||||||
"Russian": "ru",
|
|
||||||
"Spanish": "es",
|
|
||||||
"Turkish": "tr"
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,696 +0,0 @@
|
|||||||
import re
|
|
||||||
import json
|
|
||||||
import time
|
|
||||||
import random
|
|
||||||
import logging
|
|
||||||
import requests
|
|
||||||
import threading
|
|
||||||
import gradio as gr
|
|
||||||
from pathlib import Path
|
|
||||||
from modules import chat, shared, ui_chat
|
|
||||||
from modules.utils import gradio
|
|
||||||
from requests.exceptions import RequestException, ConnectionError
|
|
||||||
# Store the current disable level
|
|
||||||
current_disable_level = logging.getLogger().manager.disable
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# Load in the confignew.json and put the main settings into params #
|
|
||||||
####################################################################
|
|
||||||
this_dir = Path(__file__).parent.resolve()
|
|
||||||
def load_config(file_path):
|
|
||||||
with open(file_path, "r") as config_file:
|
|
||||||
config = json.load(config_file)
|
|
||||||
return config
|
|
||||||
# Set confiig file path
|
|
||||||
config_file_path = this_dir / "tgwui_remote_config.json"
|
|
||||||
# Load the params dictionary from the tgwui_remote_config.json file
|
|
||||||
params = load_config(config_file_path)
|
|
||||||
# Set branding
|
|
||||||
branding = params['branding']
|
|
||||||
|
|
||||||
################################
|
|
||||||
# Print Spashscreen to console #
|
|
||||||
################################
|
|
||||||
print(f"[{branding}Startup]\033[94m _ _ _ \033[1;35m_____ _ _ \033[0m _____ _____ ____ ")
|
|
||||||
print(f"[{branding}Startup]\033[94m / \ | | |\033[1;35m_ _|_ _| | | __ \033[0m |_ _|_ _/ ___| ")
|
|
||||||
print(f"[{branding}Startup]\033[94m / _ \ | | |\033[1;35m | |/ _` | | |/ / \033[0m | | | | \___ \ ")
|
|
||||||
print(f"[{branding}Startup]\033[94m / ___ \| | |\033[1;35m | | (_| | | < \033[0m | | | | ___) |")
|
|
||||||
print(f"[{branding}Startup]\033[94m /_/ \_\_|_|\033[1;35m |_|\__,_|_|_|\_\ \033[0m |_| |_| |____/ ")
|
|
||||||
print(f"[{branding}Startup]")
|
|
||||||
print(f"[{branding}Startup] \033[92m{branding}startup Mode : \033[93mText-Gen-webui Remote\033[0m")
|
|
||||||
print(f"[{branding}Startup]")
|
|
||||||
|
|
||||||
##########################
|
|
||||||
# Setup global variables #
|
|
||||||
##########################
|
|
||||||
# STARTUP VARIABLE - Import languges file for Gradio to be able to display them in the interface
|
|
||||||
with open(this_dir / "languages.json", encoding="utf8") as f:
|
|
||||||
languages = json.load(f)
|
|
||||||
# Create a global lock for tracking TTS generation occuring
|
|
||||||
process_lock = threading.Lock()
|
|
||||||
# Pull the values for IP address, port and protocol for communication with the AllTalk renote server
|
|
||||||
alltalk_protocol = params["api_def"]["api_alltalk_protocol"]
|
|
||||||
alltalk_ip_port = params["api_def"]["api_alltalk_ip_port"]
|
|
||||||
# Pull the connection timeout value for communication requests with the AllTalk remote server
|
|
||||||
connection_timeout = params["api_def"]["api_connection_timeout"]
|
|
||||||
# Create a few base global variables that are required
|
|
||||||
models_available = None # Gets populated with the list of all models/engines available on the AllTalk Server
|
|
||||||
alltalk_settings = None # Gets populated with the list of all settings currently set on the AllTalk Server
|
|
||||||
current_model_loaded = None # Gets populated with the name of the current loaded TTS engine/model on the AllTalk Server
|
|
||||||
# Used to detect if a model is loaded in to AllTalk server to block TTS genereation if needed.
|
|
||||||
tts_model_loaded = None
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Pull all the settings from the AllTalk Server #
|
|
||||||
#################################################
|
|
||||||
def get_alltalk_settings():
|
|
||||||
global current_model_loaded, models_available
|
|
||||||
voices_url = f"{alltalk_protocol}{alltalk_ip_port}/api/voices"
|
|
||||||
settings_url = f"{alltalk_protocol}{alltalk_ip_port}/api/currentsettings"
|
|
||||||
rvcvoices_url = f"{alltalk_protocol}{alltalk_ip_port}/api/rvcvoices"
|
|
||||||
|
|
||||||
try:
|
|
||||||
voices_response = requests.get(voices_url, timeout=connection_timeout)
|
|
||||||
rvcvoices_response = requests.get(rvcvoices_url, timeout=connection_timeout)
|
|
||||||
settings_response = requests.get(settings_url, timeout=connection_timeout)
|
|
||||||
|
|
||||||
if voices_response.status_code == 200 and settings_response.status_code == 200:
|
|
||||||
voices_data = voices_response.json()
|
|
||||||
rvcvoices_data = rvcvoices_response.json()
|
|
||||||
settings_data = settings_response.json()
|
|
||||||
|
|
||||||
models_available = [model["name"] for model in settings_data["models_available"]]
|
|
||||||
current_model_loaded = settings_data["current_model_loaded"]
|
|
||||||
|
|
||||||
return {
|
|
||||||
"voices": sorted(voices_data["voices"]),
|
|
||||||
"rvcvoices": (rvcvoices_data["rvcvoices"]),
|
|
||||||
"models_available": models_available,
|
|
||||||
"current_model_loaded": current_model_loaded,
|
|
||||||
"manufacturer_name": settings_data.get("manufacturer_name", ""),
|
|
||||||
"deepspeed_capable": settings_data.get("deepspeed_capable", False),
|
|
||||||
"deepspeed_available": settings_data.get("deepspeed_available", False),
|
|
||||||
"deepspeed_enabled": settings_data.get("deepspeed_enabled", False),
|
|
||||||
"generationspeed_capable": settings_data.get("generationspeed_capable", False),
|
|
||||||
"generationspeed_set": settings_data.get("generationspeed_set", 1.0),
|
|
||||||
"lowvram_capable": settings_data.get("lowvram_capable", False),
|
|
||||||
"lowvram_enabled": settings_data.get("lowvram_enabled", False),
|
|
||||||
"pitch_capable": settings_data.get("pitch_capable", False),
|
|
||||||
"pitch_set": settings_data.get("pitch_enabled", False),
|
|
||||||
"repetitionpenalty_capable": settings_data.get("repetitionpenalty_capable", False),
|
|
||||||
"repetitionpenalty_set": settings_data.get("repetitionpenalty_set", 10.0),
|
|
||||||
"streaming_capable": settings_data.get("streaming_capable", False),
|
|
||||||
"temperature_capable": settings_data.get("temperature_capable", False),
|
|
||||||
"temperature_set": settings_data.get("temperature_set", 0.75),
|
|
||||||
"ttsengines_installed": settings_data.get("ttsengines_installed", False),
|
|
||||||
"languages_capable": settings_data.get("languages_capable", False),
|
|
||||||
"multivoice_capable": settings_data.get("multivoice_capable", False),
|
|
||||||
"multimodel_capable": settings_data.get("multimodel_capable", False),
|
|
||||||
}
|
|
||||||
else:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Failed to retrieve {branding}settings from API.")
|
|
||||||
if voices_response.status_code != 200:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Failed to retrieve voices from API. Status code:\n{voices_response.status_code}")
|
|
||||||
if settings_response.status_code != 200:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Failed to retrieve current settings from API. Status code:\n{settings_response.status_code}")
|
|
||||||
return {
|
|
||||||
"voices": ["Please Refresh Settings"],
|
|
||||||
"rvcvoices": ["Please Refresh Settings"],
|
|
||||||
"models_available": ["Please Refresh Settings"],
|
|
||||||
"current_model_loaded": "Please Refresh Settings",
|
|
||||||
"manufacturer_name": "",
|
|
||||||
"deepspeed_capable": False,
|
|
||||||
"deepspeed_available": False,
|
|
||||||
"deepspeed_enabled": False,
|
|
||||||
"generationspeed_capable": False,
|
|
||||||
"generationspeed_set": 1.0,
|
|
||||||
"lowvram_capable": False,
|
|
||||||
"lowvram_enabled": False,
|
|
||||||
"pitch_capable": False,
|
|
||||||
"pitch_set": 0,
|
|
||||||
"repetitionpenalty_capable": False,
|
|
||||||
"repetitionpenalty_set": 10.0,
|
|
||||||
"streaming_capable": False,
|
|
||||||
"temperature_capable": False,
|
|
||||||
"temperature_set": 0.75,
|
|
||||||
"ttsengines_installed": False,
|
|
||||||
"languages_capable": False,
|
|
||||||
"multivoice_capable": False,
|
|
||||||
"multimodel_capable": False,
|
|
||||||
}
|
|
||||||
except (RequestException, ConnectionError) as e:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Unable to connect to the {branding}server. Status code:\n{str(e)}")
|
|
||||||
return {
|
|
||||||
"voices": ["Please Refresh Settings"],
|
|
||||||
"rvcvoices": ["Please Refresh Settings"],
|
|
||||||
"models_available": ["Please Refresh Settings"],
|
|
||||||
"current_model_loaded": "Please Refresh Settings",
|
|
||||||
"manufacturer_name": "",
|
|
||||||
"deepspeed_capable": False,
|
|
||||||
"deepspeed_available": False,
|
|
||||||
"deepspeed_enabled": False,
|
|
||||||
"generationspeed_capable": False,
|
|
||||||
"generationspeed_set": 1.0,
|
|
||||||
"lowvram_capable": False,
|
|
||||||
"lowvram_enabled": False,
|
|
||||||
"pitch_capable": False,
|
|
||||||
"pitch_set": 0,
|
|
||||||
"repetitionpenalty_capable": False,
|
|
||||||
"repetitionpenalty_set": 10.0,
|
|
||||||
"streaming_capable": False,
|
|
||||||
"temperature_capable": False,
|
|
||||||
"temperature_set": 0.75,
|
|
||||||
"ttsengines_installed": False,
|
|
||||||
"languages_capable": False,
|
|
||||||
"multivoice_capable": False,
|
|
||||||
"multimodel_capable": False,
|
|
||||||
}
|
|
||||||
|
|
||||||
#############################
|
|
||||||
#### TTS STOP GENERATION ####
|
|
||||||
#############################
|
|
||||||
def stop_generate_tts():
|
|
||||||
api_url = f"{alltalk_protocol}{alltalk_ip_port}/api/stop-generation"
|
|
||||||
try:
|
|
||||||
response = requests.put(api_url, timeout=connection_timeout)
|
|
||||||
if response.status_code == 200:
|
|
||||||
return response.json()["message"]
|
|
||||||
else:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Failed to stop generation. Status code:\n{response.status_code}")
|
|
||||||
return {"message": "Failed to stop generation"}
|
|
||||||
except (RequestException, ConnectionError) as e:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Unable to connect to the {branding}server. Status code:\n{str(e)}")
|
|
||||||
return {"message": "Failed to stop generation"}
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
#### MODEL LOADING AND UNLOADING ####
|
|
||||||
#####################################
|
|
||||||
# MODEL - Swap model based on Gradio selection
|
|
||||||
def send_reload_request(value_sent):
|
|
||||||
try:
|
|
||||||
url = f"{alltalk_protocol}{alltalk_ip_port}/api/reload"
|
|
||||||
payload = {"tts_method": value_sent}
|
|
||||||
response = requests.post(url, params=payload)
|
|
||||||
response.raise_for_status() # Raises an HTTPError for bad responses
|
|
||||||
except requests.exceptions.RequestException as e:
|
|
||||||
# Handle the HTTP request error
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Error during request to webserver process: Status code:\n{e}")
|
|
||||||
return {"status": "error", "message": str(e)}
|
|
||||||
|
|
||||||
####################################################################################################
|
|
||||||
# TGWUI # Saves all settings back to the config file for the REMOTE version of the TGWUI extension #
|
|
||||||
####################################################################################################
|
|
||||||
def tgwui_save_settings():
|
|
||||||
settings = {
|
|
||||||
"branding": params['branding'],
|
|
||||||
"tgwui": {
|
|
||||||
"tgwui_activate_tts": params["tgwui"]['tgwui_activate_tts'],
|
|
||||||
"tgwui_autoplay_tts": params["tgwui"]['tgwui_autoplay_tts'],
|
|
||||||
"tgwui_narrator_enabled": params["tgwui"]['tgwui_narrator_enabled'],
|
|
||||||
"tgwui_non_quoted_text_is": params["tgwui"]["tgwui_non_quoted_text_is"],
|
|
||||||
"tgwui_deepspeed_enabled": params["tgwui"]['tgwui_deepspeed_enabled'],
|
|
||||||
"tgwui_language": params["tgwui"]['tgwui_language'],
|
|
||||||
"tgwui_lowvram_enabled": params["tgwui"]['tgwui_lowvram_enabled'],
|
|
||||||
"tgwui_pitch_set": params["tgwui"]['tgwui_pitch_set'],
|
|
||||||
"tgwui_temperature_set": params["tgwui"]['tgwui_temperature_set'],
|
|
||||||
"tgwui_repetitionpenalty_set": params["tgwui"]['tgwui_repetitionpenalty_set'],
|
|
||||||
"tgwui_generationspeed_set": params["tgwui"]['tgwui_generationspeed_set'],
|
|
||||||
"tgwui_narrator_voice": params["tgwui"]['tgwui_narrator_voice'],
|
|
||||||
"tgwui_show_text": params["tgwui"]['tgwui_show_text'],
|
|
||||||
"tgwui_character_voice": params["tgwui"]['tgwui_character_voice'],
|
|
||||||
"tgwui_rvc_char_voice": params["tgwui"]['tgwui_rvc_char_voice'],
|
|
||||||
"tgwui_rvc_narr_voice": params["tgwui"]['tgwui_rvc_narr_voice']
|
|
||||||
},
|
|
||||||
"api_def": {
|
|
||||||
"api_use_legacy_api": params['api_def']['api_use_legacy_api'],
|
|
||||||
"api_alltalk_protocol": alltalk_protocol,
|
|
||||||
"api_alltalk_ip_port": alltalk_ip_port,
|
|
||||||
"api_connection_timeout": 5,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
with open(config_file_path, "w") as file:
|
|
||||||
json.dump(settings, file, indent=4)
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# Low VRAM change request to enable/disable #
|
|
||||||
#############################################
|
|
||||||
# LOW VRAM - Gradio Checkbox handling
|
|
||||||
def send_lowvram_request(value_sent):
|
|
||||||
try:
|
|
||||||
params["tgwui"]["tts_model_loaded"] = False
|
|
||||||
if value_sent:
|
|
||||||
audio_path = this_dir / "lowvramenabled.wav"
|
|
||||||
else:
|
|
||||||
audio_path = this_dir / "lowvramdisabled.wav"
|
|
||||||
url = f"{alltalk_protocol}{alltalk_ip_port}/api/lowvramsetting?new_low_vram_value={value_sent}"
|
|
||||||
headers = {"Content-Type": "application/json"}
|
|
||||||
response = requests.post(url, headers=headers)
|
|
||||||
response.raise_for_status() # Raises an HTTPError for bad responses
|
|
||||||
json_response = response.json()
|
|
||||||
# Check if the low VRAM request was successful
|
|
||||||
if json_response.get("status") == "lowvram-success":
|
|
||||||
# Update any relevant variables or perform other actions on success
|
|
||||||
params["tgwui"]["tts_model_loaded"] = True
|
|
||||||
return f'<audio src="file/{audio_path}" controls autoplay></audio>'
|
|
||||||
except requests.exceptions.RequestException as e:
|
|
||||||
# Handle the HTTP request error
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Error during request to webserver process: Status code:\n{e}")
|
|
||||||
return {"status": "error", "message": str(e)}
|
|
||||||
|
|
||||||
###################
|
|
||||||
#### DeepSpeed ####
|
|
||||||
###################
|
|
||||||
def send_deepspeed_request(value_sent):
|
|
||||||
try:
|
|
||||||
params["tgwui"]["tts_model_loaded"] = False
|
|
||||||
if value_sent:
|
|
||||||
audio_path = this_dir / "deepspeedenabled.wav"
|
|
||||||
else:
|
|
||||||
audio_path = this_dir / "deepspeeddisabled.wav"
|
|
||||||
url = f"{alltalk_protocol}{alltalk_ip_port}/api/deepspeed?new_deepspeed_value={value_sent}"
|
|
||||||
headers = {"Content-Type": "application/json"}
|
|
||||||
response = requests.post(url, headers=headers)
|
|
||||||
response.raise_for_status() # Raises an HTTPError for bad responses
|
|
||||||
json_response = response.json()
|
|
||||||
# Check if the deepspeed request was successful
|
|
||||||
if json_response.get("status") == "deepspeed-success":
|
|
||||||
# Update any relevant variables or perform other actions on success
|
|
||||||
params["tgwui"]["tts_model_loaded"] = True
|
|
||||||
return f'<audio src="file/{audio_path}" controls autoplay></audio>'
|
|
||||||
except requests.exceptions.RequestException as e:
|
|
||||||
# Handle the HTTP request error
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Error during request to webserver process: Status code:\n{e}")
|
|
||||||
return {"status": "error", "message": str(e)}
|
|
||||||
|
|
||||||
#################################
|
|
||||||
#### TTS STANDARD GENERATION ####
|
|
||||||
#################################
|
|
||||||
def send_and_generate(gen_text, gen_character_voice, gen_rvccharacter_voice, gen_narrator_voice, gen_rvcnarrator_voice, gen_narrator_activated, gen_textnotinisde, gen_repetition, gen_language, gen_filter, gen_speed, gen_pitch, gen_autoplay, gen_autoplay_vol, gen_file_name, gen_temperature, gen_filetimestamp, gen_stream, gen_stopcurrentgen):
|
|
||||||
api_url = f"{alltalk_protocol}{alltalk_ip_port}/api/tts-generate"
|
|
||||||
if gen_stopcurrentgen:
|
|
||||||
stop_generate_tts() # Call for the current generation to stop
|
|
||||||
tgwui_save_settings() # Save the current TGWUI settings to the config file
|
|
||||||
if gen_stream == "true":
|
|
||||||
api_url = f"{alltalk_protocol}{alltalk_ip_port}/api/tts-generate-streaming"
|
|
||||||
encoded_text = requests.utils.quote(gen_text)
|
|
||||||
streaming_url = f"{api_url}?text={encoded_text}&voice={gen_character_voice}&language={gen_language}&output_file={gen_file_name}"
|
|
||||||
return streaming_url, str("TTS Streaming Audio Generated")
|
|
||||||
else:
|
|
||||||
data = {
|
|
||||||
"text_input": gen_text,
|
|
||||||
"text_filtering": gen_filter,
|
|
||||||
"character_voice_gen": gen_character_voice,
|
|
||||||
"rvccharacter_voice_gen": gen_rvccharacter_voice,
|
|
||||||
"narrator_enabled": str(gen_narrator_activated).lower(),
|
|
||||||
"narrator_voice_gen": gen_narrator_voice,
|
|
||||||
"rvcnarrator_voice_gen": gen_rvcnarrator_voice,
|
|
||||||
"text_not_inside": gen_textnotinisde,
|
|
||||||
"language": gen_language,
|
|
||||||
"output_file_name": str(gen_file_name),
|
|
||||||
"output_file_timestamp": str(gen_filetimestamp).lower(),
|
|
||||||
"autoplay": str(gen_autoplay).lower(),
|
|
||||||
"autoplay_volume": str(gen_autoplay_vol),
|
|
||||||
"speed": str(gen_speed),
|
|
||||||
"pitch": str(gen_pitch),
|
|
||||||
"temperature": str(gen_temperature),
|
|
||||||
"repetition_penalty": str(gen_repetition),
|
|
||||||
}
|
|
||||||
#print(f"Debug: Generate request param:", data) if params["debug_tts"] else None
|
|
||||||
try:
|
|
||||||
response = requests.post(api_url, data=data)
|
|
||||||
response.raise_for_status() # Raise an exception for 4xx or 5xx status codes
|
|
||||||
result = response.json()
|
|
||||||
if gen_autoplay == "true":
|
|
||||||
return None, str("TTS Audio Generated (Played remotely)")
|
|
||||||
else:
|
|
||||||
if params["api_def"]["api_use_legacy_api"]:
|
|
||||||
return result['output_file_url'], str("TTS Audio Generated")
|
|
||||||
else:
|
|
||||||
# Prepend the URL and PORT to the output_file_url
|
|
||||||
output_file_url = f"{alltalk_protocol}{alltalk_ip_port}{result['output_file_url']}"
|
|
||||||
return output_file_url, str("TTS Audio Generated")
|
|
||||||
except (RequestException, ConnectionError) as e:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Error occurred during the API request: Status code:\n{str(e)}")
|
|
||||||
return None, str("Error occurred during the API request")
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# TGWUI # Text-generation-webui sends text for TTS generation here #
|
|
||||||
####################################################################
|
|
||||||
def output_modifier(string, state):
|
|
||||||
if not params["tgwui"]["tgwui_activate_tts"]:
|
|
||||||
return string
|
|
||||||
# Strip out Images
|
|
||||||
img_info = ""
|
|
||||||
cleaned_text, img_info = tgwui_extract_and_remove_images(string)
|
|
||||||
if cleaned_text is None:
|
|
||||||
return
|
|
||||||
# Get current settings
|
|
||||||
language_code = languages.get(params["tgwui"]["tgwui_language"])
|
|
||||||
character_voice = params["tgwui"]["tgwui_character_voice"]
|
|
||||||
rvc_character_voice = params["tgwui"]["tgwui_rvc_char_voice"]
|
|
||||||
narrator_voice = params["tgwui"]["tgwui_narrator_voice"]
|
|
||||||
rvc_narrator_voice = params["tgwui"]["tgwui_rvc_narr_voice"]
|
|
||||||
narrator_enabled = params["tgwui"]["tgwui_narrator_enabled"]
|
|
||||||
text_not_inside = params["tgwui"]["tgwui_non_quoted_text_is"]
|
|
||||||
repetition_policy = params["tgwui"]["tgwui_repetitionpenalty_set"]
|
|
||||||
text_filtering = "html"
|
|
||||||
speed = params["tgwui"]["tgwui_generationspeed_set"]
|
|
||||||
pitch = params["tgwui"]["tgwui_pitch_set"]
|
|
||||||
autoplay = False # This is never used in TGWUI so a base False setting is sent
|
|
||||||
autoplay_volume = 0.8 # This is never used in TGWUI so a base False setting is sent
|
|
||||||
temperature = params["tgwui"]["tgwui_temperature_set"]
|
|
||||||
# Lock and process TTS request
|
|
||||||
if process_lock.acquire(blocking=False):
|
|
||||||
try:
|
|
||||||
if "character_menu" in state:
|
|
||||||
output_file = state["character_menu"]
|
|
||||||
else:
|
|
||||||
output_file = str("TTSOUT_")
|
|
||||||
generate_response, status_message = send_and_generate(cleaned_text, character_voice, rvc_character_voice, narrator_voice, rvc_narrator_voice, narrator_enabled, text_not_inside, repetition_policy, language_code, text_filtering, speed, pitch, autoplay, autoplay_volume, output_file, temperature, True, False, False)
|
|
||||||
if status_message == "TTS Audio Generated":
|
|
||||||
# Handle Gradio and playback
|
|
||||||
autoplay = "autoplay" if params["tgwui"]["tgwui_autoplay_tts"] else ""
|
|
||||||
string = f'<audio src="{generate_response}" controls {autoplay}></audio>'
|
|
||||||
if params["tgwui"]["tgwui_show_text"]:
|
|
||||||
string += tgwui_reinsert_images(cleaned_text, img_info)
|
|
||||||
shared.processing_message = "*Is typing...*"
|
|
||||||
return string
|
|
||||||
else:
|
|
||||||
print(f"[{branding}Server] \033[91mWarning\033[0m Audio generation failed. Status code:\n{status_message}")
|
|
||||||
finally:
|
|
||||||
# Always release the lock, whether an exception occurs or not
|
|
||||||
process_lock.release()
|
|
||||||
else:
|
|
||||||
# The lock is already acquired
|
|
||||||
print(f"[{branding}Model] \033[91mWarning\033[0m Audio generation is already in progress. Please wait.")
|
|
||||||
return
|
|
||||||
|
|
||||||
###########################################################################################################
|
|
||||||
# TGWUI # Strips out images from the TGWUI string if needed and re-inserts the image after TTS generation #
|
|
||||||
###########################################################################################################
|
|
||||||
img_pattern = r'<img[^>]*src\s*=\s*["\'][^"\'>]+["\'][^>]*>'
|
|
||||||
|
|
||||||
def tgwui_extract_and_remove_images(text):
|
|
||||||
"""
|
|
||||||
Extracts all image data from the text and removes it for clean TTS processing.
|
|
||||||
Returns the cleaned text and the extracted image data.
|
|
||||||
"""
|
|
||||||
img_matches = re.findall(img_pattern, text)
|
|
||||||
img_info = "\n".join(img_matches) # Store extracted image data
|
|
||||||
cleaned_text = re.sub(img_pattern, '', text) # Remove images from text
|
|
||||||
return cleaned_text, img_info
|
|
||||||
|
|
||||||
def tgwui_reinsert_images(text, img_info):
|
|
||||||
"""
|
|
||||||
Reinserts the previously extracted image data back into the text.
|
|
||||||
"""
|
|
||||||
if img_info: # Check if there are images to reinsert
|
|
||||||
text += f"\n\n{img_info}"
|
|
||||||
return text
|
|
||||||
|
|
||||||
################################################################
|
|
||||||
# TGWUI # Used to generate a preview voice sample within TGWUI #
|
|
||||||
################################################################
|
|
||||||
def random_sentence():
|
|
||||||
with open(this_dir / "harvard_sentences.txt") as f:
|
|
||||||
return random.choice(list(f)).rstrip()
|
|
||||||
|
|
||||||
def voice_preview(string):
|
|
||||||
if not params["tgwui"]["tgwui_activate_tts"]:
|
|
||||||
return string
|
|
||||||
language_code = languages.get(params["tgwui"]["tgwui_language"])
|
|
||||||
if not string:
|
|
||||||
string = random_sentence()
|
|
||||||
generate_response, status_message = send_and_generate(string, params["tgwui"]["tgwui_character_voice"], params["tgwui"]["tgwui_rvc_char_voice"], params["tgwui"]["tgwui_narrator_voice"], params["tgwui"]["tgwui_rvc_narr_voice"], False, "character", params["tgwui"]["tgwui_repetitionpenalty_set"], language_code, "standard", params["tgwui"]["tgwui_generationspeed_set"], params["tgwui"]["tgwui_pitch_set"], False, 0.8, "previewvoice", params["tgwui"]["tgwui_temperature_set"], False, False, False)
|
|
||||||
if status_message == "TTS Audio Generated":
|
|
||||||
# Handle Gradio and playback
|
|
||||||
autoplay = "autoplay" if params["tgwui"]["tgwui_autoplay_tts"] else ""
|
|
||||||
return f'<audio src="{generate_response}?{int(time.time())}" controls {autoplay}></audio>'
|
|
||||||
else:
|
|
||||||
# Handle the case where audio generation was not successful
|
|
||||||
return f"[{branding}Server] Audio generation failed. Status code:\n{status_message}"
|
|
||||||
|
|
||||||
###################################################################
|
|
||||||
# TGWUI # Used to inform TGWUI that TTS is disabled/not activated #
|
|
||||||
###################################################################
|
|
||||||
def state_modifier(state):
|
|
||||||
if not params["tgwui"]["tgwui_activate_tts"]:
|
|
||||||
return state
|
|
||||||
state["stream"] = False
|
|
||||||
return state
|
|
||||||
|
|
||||||
###################################################################
|
|
||||||
# TGWUI # Sends message to TGWUI interface during TTS generation #
|
|
||||||
###################################################################
|
|
||||||
def input_modifier(string, state):
|
|
||||||
if not params["tgwui"]["tgwui_activate_tts"]:
|
|
||||||
return string
|
|
||||||
shared.processing_message = "*Is recording a voice message...*"
|
|
||||||
return string
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# TGWUI # Used to delete historic TTS audios from TGWUI chat interface #
|
|
||||||
########################################################################
|
|
||||||
def remove_tts_from_history(history):
|
|
||||||
for i, entry in enumerate(history["internal"]):
|
|
||||||
history["visible"][i] = [history["visible"][i][0], entry[1]]
|
|
||||||
return history
|
|
||||||
|
|
||||||
def toggle_text_in_history(history):
|
|
||||||
for i, entry in enumerate(history["visible"]):
|
|
||||||
visible_reply = entry[1]
|
|
||||||
if visible_reply.startswith("<audio"):
|
|
||||||
if params["tgwui"]["tgwui_show_text"]:
|
|
||||||
reply = history["internal"][i][1]
|
|
||||||
history["visible"][i] = [
|
|
||||||
history["visible"][i][0],
|
|
||||||
f"{visible_reply.split('</audio>')[0]}</audio>\n\n{reply}",
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
history["visible"][i] = [
|
|
||||||
history["visible"][i][0],
|
|
||||||
f"{visible_reply.split('</audio>')[0]}</audio>",
|
|
||||||
]
|
|
||||||
return history
|
|
||||||
|
|
||||||
def history_modifier(history):
|
|
||||||
# Remove autoplay from the last reply
|
|
||||||
if len(history["internal"]) > 0:
|
|
||||||
history["visible"][-1] = [
|
|
||||||
history["visible"][-1][0],
|
|
||||||
history["visible"][-1][1].replace("controls autoplay>", "controls>"),
|
|
||||||
]
|
|
||||||
return history
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# TGWUI # Update IP address and Port from TGWUI interface #
|
|
||||||
###########################################################
|
|
||||||
def tgwui_update_alltalk_ip_port(value_sent):
|
|
||||||
global alltalk_ip_port
|
|
||||||
alltalk_ip_port = value_sent
|
|
||||||
|
|
||||||
###########################################################
|
|
||||||
# TGWUI # Update http/https protocol from TGWUI interface #
|
|
||||||
###########################################################
|
|
||||||
# Update Protocol from Gradio
|
|
||||||
def tgwui_update_alltalk_protocol(value_sent):
|
|
||||||
global alltalk_protocol
|
|
||||||
alltalk_protocol = value_sent
|
|
||||||
|
|
||||||
###########################################################################################################################
|
|
||||||
# TGWUI # Debounces model updates when tgwui_update_dropdowns is called, preventing an update from causing a model reload #
|
|
||||||
###########################################################################################################################
|
|
||||||
def tgwui_handle_ttsmodel_dropdown_change(model_name):
|
|
||||||
if not getattr(tgwui_handle_ttsmodel_dropdown_change, "skip_reload", False):
|
|
||||||
send_reload_request(model_name)
|
|
||||||
tgwui_handle_ttsmodel_dropdown_change.skip_reload = False
|
|
||||||
|
|
||||||
##################################################################################################
|
|
||||||
# TGWUI # Pulls the current AllTalk Server settings & updates gradio when Refresh button pressed #
|
|
||||||
##################################################################################################
|
|
||||||
def tgwui_update_dropdowns():
|
|
||||||
global at_settings
|
|
||||||
at_settings = get_alltalk_settings() # Pull all the current settings from the AllTalk server, if its online.
|
|
||||||
current_voices = at_settings["voices"]
|
|
||||||
rvccurrent_voices = at_settings["rvcvoices"]
|
|
||||||
rvccurrent_character_voice = params["tgwui"]["tgwui_rvc_char_voice"]
|
|
||||||
rvccurrent_narrator_voice = params["tgwui"]["tgwui_rvc_char_voice"]
|
|
||||||
current_models_available = sorted(at_settings["models_available"])
|
|
||||||
current_model_loaded = at_settings["current_model_loaded"]
|
|
||||||
current_character_voice = params["tgwui"]["tgwui_character_voice"]
|
|
||||||
current_narrator_voice = params["tgwui"]["tgwui_narrator_voice"]
|
|
||||||
current_lowvram_capable = at_settings["lowvram_capable"]
|
|
||||||
current_lowvram_enabled = at_settings["lowvram_enabled"]
|
|
||||||
current_temperature_capable = at_settings["temperature_capable"]
|
|
||||||
current_repetitionpenalty_capable = at_settings["repetitionpenalty_capable"]
|
|
||||||
current_generationspeed_capable = at_settings["generationspeed_capable"]
|
|
||||||
current_pitch_capable = at_settings["pitch_capable"]
|
|
||||||
current_deepspeed_capable = at_settings["deepspeed_capable"]
|
|
||||||
current_deepspeed_enabled = at_settings["deepspeed_enabled"]
|
|
||||||
current_non_quoted_text_is = params.get("tgwui")["tgwui_non_quoted_text_is"] # Use the correct parameter path
|
|
||||||
current_languages_capable = at_settings["languages_capable"]
|
|
||||||
if at_settings["languages_capable"]:
|
|
||||||
language_label = "Languages"
|
|
||||||
else:
|
|
||||||
language_label = "Model not multi language"
|
|
||||||
if current_character_voice not in current_voices:
|
|
||||||
current_character_voice = current_voices[0] if current_voices else ""
|
|
||||||
params["tgwui"]["tgwui_character_voice"] = current_character_voice
|
|
||||||
if current_narrator_voice not in current_voices:
|
|
||||||
current_narrator_voice = current_voices[0] if current_voices else ""
|
|
||||||
params["tgwui"]["tgwui_narrator_voice"] = current_narrator_voice
|
|
||||||
if rvccurrent_character_voice not in rvccurrent_voices:
|
|
||||||
rvccurrent_character_voice = rvccurrent_voices[0] if rvccurrent_voices else ""
|
|
||||||
params["tgwui"]["tgwui_rvc_char_voice"] = rvccurrent_character_voice
|
|
||||||
if rvccurrent_narrator_voice not in rvccurrent_voices:
|
|
||||||
rvccurrent_narrator_voice = rvccurrent_voices[0] if rvccurrent_voices else ""
|
|
||||||
params["tgwui"]["tgwui_rvc_char_voice"] = rvccurrent_narrator_voice
|
|
||||||
tgwui_handle_ttsmodel_dropdown_change.skip_reload = True # Debounce tgwui_tts_dropdown_gr and stop it sending a model reload when it is updated.
|
|
||||||
|
|
||||||
return (
|
|
||||||
gr.Checkbox(interactive=current_lowvram_capable, value=current_lowvram_enabled),
|
|
||||||
gr.Checkbox(interactive=current_deepspeed_capable, value=current_deepspeed_enabled),
|
|
||||||
gr.Dropdown(choices=current_voices, value=current_character_voice),
|
|
||||||
gr.Dropdown(choices=rvccurrent_voices, value=rvccurrent_character_voice, interactive=True),
|
|
||||||
gr.Dropdown(choices=current_voices, value=current_narrator_voice),
|
|
||||||
gr.Dropdown(choices=rvccurrent_voices, value=rvccurrent_narrator_voice, interactive=True),
|
|
||||||
gr.Dropdown(choices=current_models_available, value=current_model_loaded),
|
|
||||||
gr.Dropdown(interactive=current_temperature_capable),
|
|
||||||
gr.Dropdown(interactive=current_repetitionpenalty_capable),
|
|
||||||
gr.Dropdown(interactive=current_languages_capable, label=language_label),
|
|
||||||
gr.Dropdown(interactive=current_generationspeed_capable),
|
|
||||||
gr.Dropdown(interactive=current_pitch_capable),
|
|
||||||
gr.Dropdown(value=current_non_quoted_text_is),
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################
|
|
||||||
# TGWUI # Gradio interface & layout for Text-generation-webui #
|
|
||||||
###############################################################
|
|
||||||
def ui():
|
|
||||||
global alltalk_settings
|
|
||||||
alltalk_settings = get_alltalk_settings() # Pull all the current settings from the AllTalk server, if its online.
|
|
||||||
with gr.Accordion(params["branding"] + " TTS (Text-gen-webui Remote)"):
|
|
||||||
tgwui_available_voices_gr = alltalk_settings["voices"]
|
|
||||||
tgwui_rvc_available_voices_gr = alltalk_settings["rvcvoices"]
|
|
||||||
# Activate alltalk_tts, Enable autoplay, Show text
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_activate_tts_gr = gr.Checkbox(value=params["tgwui"]["tgwui_activate_tts"], label="Enable TGWUI TTS")
|
|
||||||
tgwui_autoplay_gr = gr.Checkbox(value=params["tgwui"]["tgwui_autoplay_tts"], label="Autoplay TTS Generated")
|
|
||||||
tgwui_show_text_gr = gr.Checkbox(value=params["tgwui"]["tgwui_show_text"], label="Show Text in chat")
|
|
||||||
|
|
||||||
# Low vram enable, Deepspeed enable, Link
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_lowvram_enabled_gr = gr.Checkbox(value=alltalk_settings["lowvram_enabled"] if alltalk_settings["lowvram_capable"] else False, label="Enable Low VRAM Mode", interactive=alltalk_settings["lowvram_capable"])
|
|
||||||
tgwui_lowvram_enabled_play_gr = gr.HTML(visible=False)
|
|
||||||
tgwui_deepspeed_enabled_gr = gr.Checkbox(value=params["tgwui"]["tgwui_deepspeed_enabled"], label="Enable DeepSpeed", interactive=alltalk_settings["deepspeed_capable"],)
|
|
||||||
tgwui_deepspeed_enabled_play_gr = gr.HTML(visible=False)
|
|
||||||
tgwui_empty_space_gr = gr.HTML(f"<p><a href='{alltalk_protocol}{alltalk_ip_port}'>AllTalk Server & Documentation Link</a><a href='{alltalk_protocol}{alltalk_ip_port}'></a>")
|
|
||||||
|
|
||||||
# Model, Language, Character voice
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_tts_dropdown_gr = gr.Dropdown(choices=models_available, label="TTS Engine/Model", value=current_model_loaded,)
|
|
||||||
tgwui_language_gr = gr.Dropdown(languages.keys(), label="Languages" if alltalk_settings["languages_capable"] else "Model not multi language", interactive=alltalk_settings["languages_capable"], value=params["tgwui"]["tgwui_language"])
|
|
||||||
tgwui_narrator_enabled_gr = gr.Dropdown(choices=[("Enabled", "true"), ("Disabled", "false"), ("Silent", "silent")], label="Narrator Enable", value="true" if params.get("tgwui_narrator_enabled") == "true" else ("silent" if params.get("tgwui_narrator_enabled") == "silent" else "false"))
|
|
||||||
|
|
||||||
# Narrator
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_available_voices_gr = alltalk_settings["voices"]
|
|
||||||
tgwui_default_voice_gr = params["tgwui"]["tgwui_character_voice"]
|
|
||||||
if tgwui_default_voice_gr not in tgwui_available_voices_gr:
|
|
||||||
tgwui_default_voice_gr = tgwui_available_voices_gr[0] if tgwui_available_voices_gr else ""
|
|
||||||
tgwui_character_voice_gr = gr.Dropdown(choices=tgwui_available_voices_gr, label="Character Voice", value=tgwui_default_voice_gr, allow_custom_value=True,)
|
|
||||||
tgwui_narr_voice_gr = params["tgwui"]["tgwui_narrator_voice"]
|
|
||||||
if tgwui_narr_voice_gr not in tgwui_available_voices_gr:
|
|
||||||
tgwui_narr_voice_gr = tgwui_available_voices_gr[0] if tgwui_available_voices_gr else ""
|
|
||||||
tgwui_narrator_voice_gr = gr.Dropdown(choices=tgwui_available_voices_gr, label="Narrator Voice", value=tgwui_narr_voice_gr, allow_custom_value=True,)
|
|
||||||
tgwui_non_quoted_text_is_gr = gr.Dropdown(choices=[("Character", "character"), ("Narrator", "narrator"), ("Silent", "silent")], label='Narrator unmarked text is', value=params.get("tgwui_non_quoted_text_is", "character"))
|
|
||||||
|
|
||||||
# RVC voices
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_rvc_default_voice_gr = params["tgwui"]["tgwui_rvc_char_voice"]
|
|
||||||
tgwui_rvc_narrator_voice_gr = params["tgwui"]["tgwui_rvc_narr_voice"]
|
|
||||||
if tgwui_rvc_default_voice_gr not in tgwui_rvc_available_voices_gr:
|
|
||||||
tgwui_rvc_default_voice_gr = tgwui_rvc_available_voices_gr[0] if tgwui_rvc_available_voices_gr else ""
|
|
||||||
tgwui_rvc_char_voice_gr = gr.Dropdown(choices=tgwui_rvc_available_voices_gr, label="RVC Character Voice", value=tgwui_rvc_default_voice_gr, allow_custom_value=True,)
|
|
||||||
if tgwui_rvc_narrator_voice_gr not in tgwui_rvc_available_voices_gr:
|
|
||||||
tgwui_rvc_narrator_voice_gr = tgwui_rvc_available_voices_gr[0] if tgwui_rvc_available_voices_gr else ""
|
|
||||||
tgwui_rvc_narr_voice_gr = gr.Dropdown(choices=tgwui_rvc_available_voices_gr, label="RVC Narrator Voice", value=tgwui_rvc_narrator_voice_gr, allow_custom_value=True,)
|
|
||||||
|
|
||||||
# Temperature, Repetition Penalty, Speed, pitch
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_temperature_set_gr = gr.Slider(minimum=0.05, maximum=1, step=0.05, label="Temperature", value=params["tgwui"]["tgwui_temperature_set"], interactive=alltalk_settings["temperature_capable"])
|
|
||||||
tgwui_repetitionpenalty_set_gr = gr.Slider(minimum=0.5, maximum=20, step=0.5, label="Repetition Penalty", value=params["tgwui"]["tgwui_repetitionpenalty_set"], interactive=alltalk_settings["repetitionpenalty_capable"])
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_generationspeed_set_gr = gr.Slider(minimum=0.30, maximum=2.00, step=0.10, label="TTS Speed", value=params["tgwui"]["tgwui_generationspeed_set"], interactive=alltalk_settings["generationspeed_capable"])
|
|
||||||
tgwui_pitch_set_gr = gr.Slider(minimum=-10, maximum=10, step=1, label="Pitch", value=params["tgwui"]["tgwui_pitch_set"], interactive=alltalk_settings["pitch_capable"])
|
|
||||||
|
|
||||||
# Preview speech
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_preview_text_gr = gr.Text(show_label=False, placeholder="Preview text", elem_id="silero_preview_text", scale=2,)
|
|
||||||
tgwui_preview_play_gr = gr.Button("Generate Preview", scale=1)
|
|
||||||
tgwui_preview_audio_gr = gr.HTML(visible=False)
|
|
||||||
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_protocol_gr = gr.Dropdown(choices=["http://", "https://"], label="AllTalk Server Protocol", value=alltalk_protocol)
|
|
||||||
tgwui_protocol_gr.change(tgwui_update_alltalk_protocol, tgwui_protocol_gr, None)
|
|
||||||
tgwui_ip_address_port_gr = gr.Textbox(label="AllTalk Server IP:Port", value=alltalk_ip_port)
|
|
||||||
tgwui_ip_address_port_gr.change(tgwui_update_alltalk_ip_port, tgwui_ip_address_port_gr, None)
|
|
||||||
tgwui_refresh_settings_gr = gr.Button("Refresh settings & voices")
|
|
||||||
tgwui_refresh_settings_gr.click(tgwui_update_dropdowns, None, [tgwui_lowvram_enabled_gr, tgwui_deepspeed_enabled_gr, tgwui_character_voice_gr, tgwui_rvc_char_voice_gr, tgwui_narrator_voice_gr, tgwui_rvc_narr_voice_gr, tgwui_tts_dropdown_gr, tgwui_temperature_set_gr, tgwui_repetitionpenalty_set_gr, tgwui_language_gr, tgwui_generationspeed_set_gr, tgwui_pitch_set_gr, tgwui_non_quoted_text_is_gr])
|
|
||||||
|
|
||||||
with gr.Row():
|
|
||||||
tgwui_convert_gr = gr.Button("Remove old TTS audio and leave only message texts")
|
|
||||||
tgwui_convert_cancel_gr = gr.Button("Cancel", visible=False)
|
|
||||||
tgwui_convert_confirm_gr = gr.Button("Confirm (cannot be undone)", variant="stop", visible=False)
|
|
||||||
tgwui_stop_generation_gr = gr.Button("Stop current TTS generation")
|
|
||||||
tgwui_stop_generation_gr.click(stop_generate_tts, None, None,)
|
|
||||||
|
|
||||||
# Convert history with confirmation
|
|
||||||
convert_arr = [tgwui_convert_confirm_gr, tgwui_convert_gr, tgwui_convert_cancel_gr]
|
|
||||||
tgwui_convert_gr.click(lambda: [gr.update(visible=True), gr.update(visible=False), gr.update(visible=True),], None, convert_arr,)
|
|
||||||
tgwui_convert_confirm_gr.click(lambda: [ gr.update(visible=False), gr.update(visible=True), gr.update(visible=False),], None, convert_arr,
|
|
||||||
).then(remove_tts_from_history, gradio("history"), gradio("history")
|
|
||||||
).then(chat.save_history, gradio("history", "unique_id", "character_menu", "mode"), None,
|
|
||||||
).then(chat.redraw_html, gradio(ui_chat.reload_arr), gradio("display"))
|
|
||||||
tgwui_convert_cancel_gr.click(lambda: [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False),], None, convert_arr,)
|
|
||||||
|
|
||||||
# Toggle message text in history
|
|
||||||
tgwui_show_text_gr.change(lambda x: params["tgwui"].update({"tgwui_show_text": x}), tgwui_show_text_gr, None
|
|
||||||
).then(toggle_text_in_history, gradio("history"), gradio("history")
|
|
||||||
).then(chat.save_history, gradio("history", "unique_id", "character_menu", "mode"), None,
|
|
||||||
).then(chat.redraw_html, gradio(ui_chat.reload_arr), gradio("display"))
|
|
||||||
|
|
||||||
# Event functions to update the parameters in the backend
|
|
||||||
tgwui_activate_tts_gr.change(lambda x: params["tgwui"].update({"tgwui_activate_tts": x}), tgwui_activate_tts_gr, None)
|
|
||||||
tgwui_autoplay_gr.change(lambda x: params["tgwui"].update({"tgwui_autoplay_tts": x}), tgwui_autoplay_gr, None)
|
|
||||||
tgwui_lowvram_enabled_gr.change(lambda x: params["tgwui"].update({"tgwui_lowvram_enabled": x}), tgwui_lowvram_enabled_gr, None)
|
|
||||||
tgwui_lowvram_enabled_gr.change(lambda x: send_lowvram_request(x), tgwui_lowvram_enabled_gr, tgwui_lowvram_enabled_play_gr, None)
|
|
||||||
|
|
||||||
# Trigger the send_reload_request function when the dropdown value changes
|
|
||||||
tgwui_tts_dropdown_gr.change(tgwui_handle_ttsmodel_dropdown_change, tgwui_tts_dropdown_gr, None)
|
|
||||||
|
|
||||||
tgwui_deepspeed_enabled_gr.change(lambda x: params["tgwui"].update({"tgwui_deepspeed_enabled": x}), tgwui_deepspeed_enabled_gr, None)
|
|
||||||
tgwui_deepspeed_enabled_gr.change(send_deepspeed_request, tgwui_deepspeed_enabled_gr, tgwui_deepspeed_enabled_play_gr, None)
|
|
||||||
tgwui_character_voice_gr.change(lambda x: params["tgwui"].update({"tgwui_character_voice": x}), tgwui_character_voice_gr, None)
|
|
||||||
tgwui_language_gr.change(lambda x: params["tgwui"].update({"tgwui_language": x}), tgwui_language_gr, None)
|
|
||||||
|
|
||||||
# TSS Settings
|
|
||||||
tgwui_temperature_set_gr.change(lambda x: params["tgwui"].update({"tgwui_temperature_set": x}), tgwui_temperature_set_gr, None)
|
|
||||||
tgwui_repetitionpenalty_set_gr.change(lambda x: params["tgwui"].update({"tgwui_repetitionpenalty_set": x}), tgwui_repetitionpenalty_set_gr, None)
|
|
||||||
tgwui_generationspeed_set_gr.change(lambda x: params["tgwui"].update({"tgwui_generationspeed_set": x}), tgwui_generationspeed_set_gr, None)
|
|
||||||
tgwui_pitch_set_gr.change(lambda x: params["tgwui"].update({"tgwui_pitch_set": x}), tgwui_pitch_set_gr, None)
|
|
||||||
|
|
||||||
# Narrator selection actions
|
|
||||||
tgwui_narrator_enabled_gr.change(lambda x: params["tgwui"].update({"tgwui_narrator_enabled": x}), tgwui_narrator_enabled_gr, None)
|
|
||||||
tgwui_non_quoted_text_is_gr.change(lambda x: params["tgwui"].update({"tgwui_non_quoted_text_is": x}), tgwui_non_quoted_text_is_gr, None)
|
|
||||||
tgwui_narrator_voice_gr.change(lambda x: params["tgwui"].update({"tgwui_narrator_voice": x}), tgwui_narrator_voice_gr, None)
|
|
||||||
|
|
||||||
# RVC selection actions
|
|
||||||
tgwui_rvc_char_voice_gr.change(lambda x: params["tgwui"].update({"tgwui_rvc_char_voice": x}), tgwui_rvc_char_voice_gr, None)
|
|
||||||
tgwui_rvc_narr_voice_gr.change(lambda x: params["tgwui"].update({"tgwui_rvc_narr_voice": x}), tgwui_rvc_narr_voice_gr, None)
|
|
||||||
|
|
||||||
# Play preview
|
|
||||||
tgwui_preview_text_gr.submit(voice_preview, tgwui_preview_text_gr, tgwui_preview_audio_gr)
|
|
||||||
tgwui_preview_play_gr.click(voice_preview, tgwui_preview_text_gr, tgwui_preview_audio_gr)
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"branding": "AllTalk ",
|
|
||||||
"tgwui": {
|
|
||||||
"tgwui_activate_tts": true,
|
|
||||||
"tgwui_autoplay_tts": true,
|
|
||||||
"tgwui_narrator_enabled": "false",
|
|
||||||
"tgwui_non_quoted_text_is": "narrator",
|
|
||||||
"tgwui_deepspeed_enabled": false,
|
|
||||||
"tgwui_language": "English",
|
|
||||||
"tgwui_lowvram_enabled": false,
|
|
||||||
"tgwui_pitch_set": 0,
|
|
||||||
"tgwui_temperature_set": 0.75,
|
|
||||||
"tgwui_repetitionpenalty_set": 10,
|
|
||||||
"tgwui_generationspeed_set": 1,
|
|
||||||
"tgwui_narrator_voice": "Please Refresh Settings",
|
|
||||||
"tgwui_show_text": true,
|
|
||||||
"tgwui_character_voice": "Please Refresh Settings",
|
|
||||||
"tgwui_rvc_char_voice": "Disabled",
|
|
||||||
"tgwui_rvc_narr_voice": "Disabled"
|
|
||||||
},
|
|
||||||
"api_def": {
|
|
||||||
"api_use_legacy_api": false,
|
|
||||||
"api_alltalk_protocol": "http://",
|
|
||||||
"api_alltalk_ip_port": "127.0.0.1:7851",
|
|
||||||
"api_connection_timeout": 5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user