semvec/pypi-packages huggingface dataset:
natureAlgo 0.1.0
Nature Based Algorithm Library
License: MIT

# natureAlgo: Nature-Inspired Optimization Library

natureAlgo is a Python library for nature-inspired optimization algorithms. It provides implementations of optimization algorithms inspired by the behavior of natural systems, such as bees. It was created as a demo library to understand how to publish libraries to pypi.

## Features

- Implementation of the Artificial Bee Colony (ABC) algorithm.
- Easily extendable for adding more nature-inspired optimization algorithms.

## Installation

You can install natureAlgo via pip:

```bash
pip install natureAlgo
```

## Usage

```Python
import pandas as pd
import numpy as np
from natureAlgo import bee_colony

# Create a sample DataFrame for optimization
data = pd.DataFrame(np.random.rand(10, 2), columns=['Feature1', 'Feature2'])

# Define the objective function
def objective_function(x):
    return sum([x_i ** 2 for x_i in x])

# Initialize the ABC algorithm
abc = bee_colony.ArtificialBeeColony(data, objective_function, max_iterations=100, num_employed=10, num_onlookers=10)

# Run the ABC algorithm
abc.run()

# Get the best solution and its fitness
best_solution = abc.best_solution
best_fitness = abc.best_fitness

print("Best solution:", best_solution)
print("Best fitness:", best_fitness)
```

## Contributing
Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, feel free to open an issue or submit a pull request.

## License
This project is licensed under the MIT License - see the LICENSE file for details.

## Credits
The ABC algorithm implementation and README.md template were provided by OpenAI's ChatGPT.
aivoifu 0.2.9
Easy and fast AI Waifu voice generation
License: MIT
Requires Python: <4.0,>=3.10

# AIwaifu Vocal Pipeline
Waifu Voice - Made Easy


an implementation of AIwaifu Vocal Pipeline to make it easier to create a fast and easy-to-use Cute Waifu Voice
Text -> TTS -> Voice Conversion -> Done

## Usage
```bash
# pip install aivoifu
poetry install aivoifu # Recommended using poetry
```
```python
from AIvoifu import client_pipeline

model = client_pipeline.tts_pipeline(tts_model_selection='gtts', vc_model_selection='ayaka-jp', hubert_model='zomehwh-hubert-base', language='en')
model.tts('Hello This Is A Test Text Anyway', save_path='./test.wav')
```

## How to add your own TTS/Voice Conversion pipeline
First of all we need to understand how AIwaifu Vocal Pipeline was design
There's two components
1. TTS: This is a typical text to speech model which you can add your own
2. Voice_Conversion: This is our Heroine on making TTS sound like a cute girl by converting TTS speech using Voice Conversion which you can train easily

First of all we get TTS voice from TTS pipeline, adn the we do voice conversion on it
### Custom TTS
in the TTS folder you'll found
- tts_base_model: folder
- tts.py

if you wish to add your own TTS model please create a class in tts.py
and in the function constructor please download the weight and cache it
under the tts_base_model along with other cache file
```python
# Example code
class CustomTTS:
  def __init__(self) -> None:
    from something import tts_library
    self.model_link = 'Huggingface_link'
    root = os.path.dirname(os.path.abspath(__file__))
    self.model_root_path = f'{root}/base_tts_model/'
    self.model_name = 'custom_tts'
    model_path = f'{self.model_root_path}/{self.model_name}'
    if not os.path.exist(model_path)
      os.mkdir(model_path)
    weigh_path = f'{model_path}/{self.model_name}.pth'
    if not os.path.exist(weigh_path):
      wget.download(self.model_link, weigh_path)
    self.model = tts_library.load(weigh_path)
    print(f'model {self.model_name} initialized')

  def tts(self, text:str, save:boolean=True, your_args:any):
    # some preprocessing
    output = self.model.tts(text)
    if save:
      output.save('save_path')
    return output
```
### Custom Voice Conversion
if you're not looking to add new language but just want to custom the model voice easily

Our recommendation is to just Train Voice Conversion pipeline on your own samples and added it to the zoo