Coder Social home page Coder Social logo

silero-webui's Introduction

Silero web UI

A browser interface based on Gradio library for Silero TTS.

Preview

Installation and Running

# Clone
git clone https://github.com/GhostNaN/silero-webui
cd silero-webui
# Create venv
python -m venv venv
source venv/bin/activate
# Install requirements
pip install -r requirements.txt
# Run app
python app.py

You can also run with the included shell script

Acknowledgments

silero-webui's People

Contributors

ghostnan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bethington

silero-webui's Issues

not working numpy and backend issue

it begins with this, but the web ui starts despite that there is allready an error

module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "D:\working-dir\silero-webui\app.py", line 7, in <module>
    import torch
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torch\__init__.py", line 2120, in <module>
    from torch._higher_order_ops import cond
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torch\_higher_order_ops\__init__.py", line 1, in <module>
    from .cond import cond
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torch\_higher_order_ops\cond.py", line 5, in <module>
    import torch._subclasses.functional_tensor
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torch\_subclasses\functional_tensor.py", line 42, in <module>
    class FunctionalTensor(torch.Tensor):
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torch\_subclasses\functional_tensor.py", line 258, in FunctionalTensor
    cpu = _conversion_method_template(device=torch.device("cpu"))
D:\working-dir\silero-webui\venv\Lib\site-packages\torch\_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.)
  cpu = _conversion_method_template(device=torch.device("cpu"))
Running on local URL:  http://127.0.0.1:7860[/code]

but as soon as you try to generate any sound this happens

Traceback (most recent call last):
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\gradio\route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\gradio\blocks.py", line 1923, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\gradio\blocks.py", line 1508, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\gradio\utils.py", line 818, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\app.py", line 77, in generate
    torchaudio.save(output_file, audio, params['sample_rate'], format="wav")
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torchaudio\_backend\utils.py", line 312, in save
    backend = dispatcher(uri, format, backend)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\working-dir\silero-webui\venv\Lib\site-packages\torchaudio\_backend\utils.py", line 222, in dispatcher
    raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri output.wav and format wav.

Hello! Pls help me!

(venv) C:\Users\Administrator\Desktop\silero-webui>python app.py
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
[nltk_data] Downloading package punkt to
[nltk_data]     C:\Users\Administrator\Desktop\silero-webui...
[nltk_data]   Package punkt is already up-to-date!
Using cache found in C:\Users\Administrator/.cache\torch\hub\snakers4_silero-models_master
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\gradio\queueing.py", line 406, in call_prediction
    output = await route_utils.call_process_api(
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\gradio\route_utils.py", line 217, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\gradio\blocks.py", line 1553, in process_api
    result = await self.call_function(
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\gradio\blocks.py", line 1191, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\gradio\utils.py", line 659, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\Administrator\Desktop\silero-webui\app.py", line 79, in generate
    torchaudio.save(output_file, audio, params['sample_rate'])
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\torchaudio\_backend\utils.py", line 311, in save
    backend = dispatcher(uri, format, backend)
  File "C:\Users\Administrator\Desktop\silero-webui\venv\lib\site-packages\torchaudio\_backend\utils.py", line 221, in dispatcher
    raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri output.wav and format None.

And also where I should put other models? I wanna use other language models but I can't becuz don't know where I should put it

Invalid XML format

When I give text: <p>When I wake up, I speak quite slowly. Then I start speaking in my normal voice</p> I get ValueError: Invalid XML format in the server.

If I remove the dot then it works. Also, all XML like <prosody rate="x-slow"> fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.