semvec/pypi-packages huggingface dataset:
liepa-tts 0.1.0
Python bindings for Lithuanian language synthesizer from LIEPA project
License: MIT
Requires Python: >=3.6,<4.0
Keywords: tts,text2speech,lithuanian

# [LIEPA](https://www.raštija.lt/liepa)

#### Lietuvių šneka valdomos paslaugos (Lithuanian speech controlled services)

This project aims to provide high quality digital Lithuanian speech services
for free.
So far there are several services provided at various stages of completeness,
such as Lithuanian speech recognizer and Lithuanian speech synthesizer.

This package wraps the latter.

## Dependencies

For this package (liepa-tts) to work you need synthesizer binaries which you'll
have to compile yourself.

The original sources can be acquired [here](http://liepaatnaujinimai.rastija.lt/sintezatorius/SintezesVariklis_LIEPAprojektas.zip)

To make it easier to build binaries for platforms other than Windows you can
acquire fixed-up sources here: [laba-diena-tts](https://github.com/OzymandiasTheGreat/laba-diena-tts)

Once you build binaries from the native-modules subtree make sure they are
available on LIBRARY_PATH (for building) and LD_LIBRARY_PATH (for runtime).

## Installation

I highly recommend [Poetry](https://poetry.eustace.io/)

`poetry add liepa-tts`

If you must, use pip:

`pip install liepa-tts`

You need numpy available for building C extension, so if you get errors first install that:

`pip install numpy`

## Usage

```python
from liepa_tts import liepa

# All strings must be encoded with Windows Baltic encoding
ENCODING = "cp1257"

# First parameter is the path to data directory
# Second parameter is the path to voice directory
# All paths must include trailing slash
# Returns error code
liepa.init("data/".encode(ENCODING), "data/Edvardas/".encode(ENCODING))

# Parameters:
# text: String that will be syntesized
# outSize: Integer. Typically this takes ~3072 per phoneme (letter), if it's too small you'll get buffer overflow errors
# speed: Integer. The larger the value the slower the voice will talk. Can be negative.
# tone: Integer. The pitch. Larger values make for higher pitch. Can be negative.
# Returns tuple (error code, ndarray). ndarray contains wav data without headers as array of integers.
text = "Laba diena. Kaip jums sekasi?".encode(ENCODING)
err, buff = liepa.synth(text, len(text) * 3072, 100, 0)

# Parameters:
# buff: The ndarray returned by liepa.synth() method
# filename: encoded path to output file
liepa.toWav(buff, "test.wav".encode(ENCODING))

# Call this when you're done to free resources
liepa.unload()
```

##### Notes:

Error codes produces by the synthesizer are defined in
`include/LithUSS_Error.h` so if you need more info on
the error you're getting check that file.

You can acquire the data files along with original sources [here](http://liepaatnaujinimai.rastija.lt/sintezatorius/SintezesVariklis_LIEPAprojektas.zip)

The files that must be present in `data/` directory are:

- `abb.txt`
- `duom.txt`
- `rules.txt`
- `skaitm.txt`

You should extract voice directories unmodified.

The `.wav` produce by the synthesizer is completely unoptimized and contains
a lot of silence. Therefor you should further process it before usage.
pyeasyrpc 0.0.1
a Python RPC framework using redis
License: MIT
Keywords: rpc-framework,redis

# PyEasyRPC
[![Build Status](https://travis-ci.com/wo1fsea/PyEasyRPC.svg?branch=master)](https://travis-ci.com/wo1fsea/PyEasyRPC)
[![codecov](https://codecov.io/gh/wo1fsea/PyEasyRPC/branch/master/graph/badge.svg)](https://codecov.io/gh/wo1fsea/PyEasyRPC)

PyEaseRPC is a Python RPC framework easy to use, which using Redis as backend.

## Example
### Server

```
# example_server.py
from pyeasyrpc.rpc import remote_method
from pyeasyrpc.rpc import RPCService


class ServiceInstance(RPCService):
    @remote_method
    def add(self, a, b):
        return a + b

    @remote_method
    def sub(self, a, b):
        return a - b

    @remote_method
    def make_dict(self, **kwargs):
        return dict(kwargs)

    @remote_method
    def make_list(self, *args):
        return list(args)


def main():
    instance0 = ServiceInstance(process_request_in_thread=True)
    instance0.start_background_running()

    input("press any key to stop")

    instance0.stop_background_running()


if __name__ == '__main__':
    main()

```

## Client

```
# example_client.py
from pyeasyrpc.rpc import RPCClient


def main():
    client = RPCClient("ServiceInstance")
    print("method_list", client.get_methods())

    print("add", client.add(1, 2))
    print("sub", client.sub(100, 1.1))
    print("make_dict", client.make_dict(a=1, b=2, c=3))
    print("make_list", client.make_list(1, [2], {3}))

    try:
        client.add()
    except Exception as ex:
        print(type(ex), ex)


if __name__ == '__main__':
    main()
```

### Async Client

```
# example_client_async.py

import asyncio
from pyeasyrpc.rpc import AsyncRPCClient


def main():
    client = AsyncRPCClient("ServiceInstance")
    print("method_list", client.get_methods())

    async def add():
        print("add", await client.add(1, 2))

    async def sub():
        print("sub", await client.sub(100, 1.1))

    async def make_dict():
        print("make_dict", await client.make_dict(a=1, b=2, c=3))

    async def make_list():
        print("make_list", await client.make_list(1, [2], {3}))

    async def catch_exception():
        try:
            await client.add()
        except Exception as ex:
            print(type(ex), ex)

    async def func():
        task = [add(), sub(), make_list(), make_dict(), catch_exception()]
        # task.extend([add() for i in range(100)])
        # task.extend([sub() for i in range(100)])
        # task.extend([make_list() for i in range(100)])
        # task.extend([make_dict() for i in range(100)])
        # task.extend([catch_exception() for i in range(100)])
        await asyncio.wait(task)

    loop = asyncio.get_event_loop()
    loop.run_until_complete(func())


if __name__ == '__main__':
    main()
```
discord-timers 0.1.0
Timers for bots made with discord.py
License: MIT
Requires Python: >=3.5.3
Keywords: asyncio,discord,timers

# discord-timers

A simple extension for discord.py which provides basic timer support.

## Installing

```bash
pip install discord-timers -U
```

## Example

```python
import datetime

from discord.ext import commands, timers


bot = commands.Bot(command_prefix="!")
bot.timer_manager = timers.TimerManager(bot)


@bot.command(name="remind")
async def remind(ctx, time, *, text):
    """Remind to do something on a date.

    The date must be in ``Y/M/D`` format."""
    date = datetime.datetime(*map(int, time.split("/")))

    bot.timer_manager.create_timer("reminder", date, args=(ctx.channel.id, ctx.author.id, text))
    # or without the manager
    timers.Timer(bot, "reminder", date, args=(ctx.channel.id, ctx.author.id, text)).start()

@bot.event
async def on_reminder(channel_id, author_id, text):
    channel = bot.get_channel(channel_id)

    await channel.send("Hey, <@{0}>, remember to: {1}".format(author_id, text))


bot.run("token")
```