Skip to main content

Interface with shabda for audio samples and text speech.

Project description

FoxDotShabda - Interface with shabda for audio samples and text speech

Instalation

pip install FoxDotShabda
# or
pip install git+https://codeberg.org/FoxDotExtensions/FoxDotShabda

Usage

Import lib

from FoxDot.lib.Extensions.Shabda import samples, speech

samples(definition: str)

Fetch random samples from freesound

Any word can be a pack definition. If you want more than one sample, separate words by a comma: "blue,red"

You can define how many variations of a sample to assemble by adding a colon and a number. e.g. blue,red:3,yellow:2 will produce one 'blue' sample, three 'red' samples and two 'yellow' sample.

samples('bass:4,hihat:4,rimshot:2')

will print in the terminal when finished downloading

s1 >> loop('bass', dur=PDur(3,8), sample=2)
s2 >> loop('hihat', dur=10, sus=2)
s3 >> loop('rimshot', dur=PDur(7,9)*8, sample=2)

speech(words: str, language: str = 'en-GB', gender: str = 'f')

Generate Text-to-Speech samples.

If you want more than one sample, separate words by a comma: "hello,bye" If you want a sentence, separate it with _: "eita_carai,oi"

By default the language is en-GB but you can change this.

The gender of the voice unfortunately can be f and m.

If you only want to change the gender, use the following syntax

speech('baby', gender='m')
speech('what')
speech('voa,ai','pt-BR')
speech('eita_carai,continua','pt-BR','m')

will print in the terminal when finished downloading

v1 >> loop('eita_carai', dur=4, pan=[-5,0,1,0])
v2 >> loop('voa', dur=PDur(3,8), pan=[0,1,0,-5])
v3 >> loop('ai', dur=4, pan=[1,0,-5,0])
v4 >> loop('continua', dur=var([PDur(3,8), 6], [7,1]), pan=[0,1,0,-5])
v5 >> loop('what', dur=8, sus=2, pan=[0,1,0,-5])

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

foxdotshabda-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foxdotshabda-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file foxdotshabda-0.1.0.tar.gz.

File metadata

  • Download URL: foxdotshabda-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1

File hashes

Hashes for foxdotshabda-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c630f3954f6dc0bd6127a0b52082329e0d22f996cb8c2cf0e32797abb233806e
MD5 cd3ee9534c725423295bf24dcc77cb31
BLAKE2b-256 094b3cd714bd79037a6470e4a5d2e7f6ad6956a7564e44abc21697e15b0793e3

See more details on using hashes here.

File details

Details for the file foxdotshabda-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: foxdotshabda-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1

File hashes

Hashes for foxdotshabda-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c772017d5f032609226d34f119f1a859ebdf5004ff6097ff0ee9c5298cebbfcb
MD5 b332e2752039436ac35553d5ef514243
BLAKE2b-256 1d8e442c1e83ab5747aaee26c70f3cea616fddb316e7b3fa1b45804bc9c8ad3e

See more details on using hashes here.

Supported by

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