Skip to main content

No project description provided

Project description

Jasmine Zinc

Usage: Module

get_avatars

from jasmine_zinc import get_avatars

avatars = get_avatars(
    server_url='http://user:password@server_ip:7180',
)

print(avatars)

talk_on_server

from jasmine_zinc import talk_on_server, Talk

result = talk_on_server(
    server_url='http://user:password@server_ip:7180',
    cid=5201,
    talk=Talk(
        talktext='てすと',
    ),
)

print(result.message)

record_talk

from jasmine_zinc import record_talk, Talk

result = record_talk(
    server_url='http://user:password@server_ip:7180',
    cid=5201,
    talk=Talk(
        talktext='てすと',
    ),
    frequency=48000,
)


from playsound import playsound
import tempfile

with tempfile.NamedTemporaryFile() as fp:
    fp.write(result.wave_binary)

    playsound(fp.name)

Usage: Console Scripts

Environment Variables

SERVER_URL=http://user:password@server_ip:7180

jaz_get_avatars

Fetch avatar list (cid, name, etc.). Currently, the output format is work in progress.

jaz_get_avatars --server-url=http://user:password@server_ip:7180

export SERVER_URL=http://user:password@server_ip:7180
jaz_get_avatars

jaz_talk_on_server

Talk on server.

jaz_talk_on_server -cid 5201 -t "talktext" --server-url=http://user:password@server_ip:7180

export SERVER_URL=http://user:password@server_ip:7180
jaz_talk_on_server -cid 5201 -t "talktext"

echo "talktext" | jaz_talk_on_server -cid 5201 -f /dev/stdin

jaz_record_talk

Record a talk voice on server, download as a wave file and play on client.

jaz_record_talk -cid 5201 -t "talktext" --server-url=http://user:password@server_ip:7180

export SERVER_URL=http://user:password@server_ip:7180
jaz_record_talk -cid 5201 -t "talktext"

echo "talktext" | jaz_record_talk -cid 5201 -f /dev/stdin

Development: Test Console Scripts

Create .env file

SERVER_URL=http://user:password@server_ip:7180

Execute

./scripts/get_avatars

./scripts/talk_on_server 5201 てすと

./scripts/record_talk 5201 てすと

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jasmine_zinc-20210903.14.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

jasmine_zinc-20210903.14-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page