Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aoirint/jasmine_zinc
方針検討中
https://github.com/aoirint/jasmine_zinc
Last synced: about 1 month ago
JSON representation
方針検討中
- Host: GitHub
- URL: https://github.com/aoirint/jasmine_zinc
- Owner: aoirint
- License: mit
- Created: 2021-09-02T21:38:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-03T00:56:03.000Z (over 3 years ago)
- Last Synced: 2024-10-28T16:57:11.624Z (2 months ago)
- Language: Python
- Homepage: https://pypi.org/project/jasmine-zinc/
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jasmine Zinc
## Usage: Module
### get_avatars
```python
from jasmine_zinc import get_avatarsavatars = get_avatars(
server_url='http://user:password@server_ip:7180',
)print(avatars)
```### talk_on_server
```python
from jasmine_zinc import talk_on_server, Talkresult = talk_on_server(
server_url='http://user:password@server_ip:7180',
cid=5201,
talk=Talk(
talktext='てすと',
),
)print(result.message)
```### record_talk
```python
from jasmine_zinc import record_talk, Talkresult = record_talk(
server_url='http://user:password@server_ip:7180',
cid=5201,
talk=Talk(
talktext='てすと',
),
frequency=48000,
)from playsound import playsound
import tempfilewith tempfile.NamedTemporaryFile() as fp:
fp.write(result.wave_binary)playsound(fp.name)
```## Usage: Console Scripts
### Environment Variables
```env
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.```shell
jaz_get_avatars --server-url=http://user:password@server_ip:7180export SERVER_URL=http://user:password@server_ip:7180
jaz_get_avatars
```### jaz_talk_on_server
Talk on server.```shell
jaz_talk_on_server -cid 5201 -t "talktext" --server-url=http://user:password@server_ip:7180export 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.```shell
jaz_record_talk -cid 5201 -t "talktext" --server-url=http://user:password@server_ip:7180export 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
```env
SERVER_URL=http://user:password@server_ip:7180
```### Execute
```shell
./scripts/get_avatars./scripts/talk_on_server 5201 てすと
./scripts/record_talk 5201 てすと
```## Development: Load env vars from .env file
```shell
export $(cat .env | xargs)
```