A wrapper of well-known translators that transform text into its phonetic transcription
Project description
Transcriber Wrapper
Inspired by Phonemizer, this a simpler version focused in transcription applications that work with IPA (International Phonetic Alphabet). This works like a wrapper which is responsible to call a back-end application, let's say espeak-ng. It adds some features on top of it like with stress
option.
Usage
For now, you need to install espeak-ng on your operational system. See Dockerfile.dev as an example. After that, you can create a transcriber and then use it in your logic:
from typing import List
import transcriber_wrapper
# The standard language is "en-us"
transcriber_en_us = transcriber_wrapper.build_transcriber()
def do_the_thing(words: List[str]) -> List[str]:
return transcriber_en_us.transcribe(words)
Development
Executing commands directly on the binaries
After building the remote interpreter service, just enter in it:
docker-compose run remote-interpreter sh
You must be at /usr/bin/
. Then try one of these below:
espeak-ng "Hello my friend, stay awhile and listen!" -ven-us -x --ipa -q --sep=_
espeak-ng "Curiosity" -ven-us -x --ipa -q --sep=" "
espeak-ng "If you will not bow before a sultan, then you will cower before a sorcerer!" -ven-us -x --ipa -q
Interesting links:
Updating pipenv dependencies
If you update Pipfile, you can issue the following command to refresh your lock file:
docker-compose run remote-interpreter pipenv update
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
Built Distribution
Hashes for transcriber-wrapper-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2da83d5d3e4186317640f940eef67e57416ebcc5a518287a257ffa0a9261d53 |
|
MD5 | d81117e3d014e9e5457fa706723bda4a |
|
BLAKE2b-256 | 1bbb6eead3840ee22cd4483bf05c39d3a0435ffa042cfa85112eb8d96dc15f4d |
Hashes for transcriber_wrapper-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1e8238a8c7e2687e9c2a2456cd392ac3b7080fa8c9ebdcf37267bdcd7cccae3 |
|
MD5 | bb11f36e58d020ca43a2c38cb8e6998e |
|
BLAKE2b-256 | 60bc5a77449354e1ada8e7d17732203b3e5f8adf01ab31e85b4487f4ece7de4f |