Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/azu/pronunciation-lexicon-specification-json

Convert JSON to Pronunciation Lexicon Specification (PLS) XML.
https://github.com/azu/pronunciation-lexicon-specification-json

amazon json notation pls polly xml

Last synced: 7 days ago
JSON representation

Convert JSON to Pronunciation Lexicon Specification (PLS) XML.

Awesome Lists containing this project

README

        

# pronunciation-lexicon-specification-json

Convert JSON to Pronunciation Lexicon Specification(PLS) XML.

- Human writable JSON to Pronunciation Lexicon Specification (PLS) XML.

PLS spec: [Pronunciation Lexicon Specification (PLS) Version 1.0](https://www.w3.org/TR/pronunciation-lexicon/ "Pronunciation Lexicon Specification (PLS) Version 1.0")

## Install

Install with [npm](https://www.npmjs.com/):

npm install pronunciation-lexicon-specification-json

## Usage

```js
import {jsonToPLSXML} from "pronunciation-lexicon-specification-json";
jsonToPLSXML({
"lang": "en-US",
"alphabet": "ipa",
"lexeme": [
{
"grapheme": [
"colour",
"color"
],
"phoneme": "kʌlər"
},
{
"grapheme": "Roberto",
"phoneme": "ɹəˈbɛːɹɾoʊ"
}
]
})
```

It output PLS(XML).

```xml


colour
color
kʌlər


Roberto
ɹəˈbɛːɹɾoʊ

```

## Related

- [Using the PutLexicon Operation - Amazon Polly](http://docs.aws.amazon.com/polly/latest/dg/gs-put-lexicon.html "Using the PutLexicon Operation - Amazon Polly")
- [Working with Speech Recognition Grammar — OpenHRI Manual](http://openhri.readthedocs.io/en/latest/workingwithgrammar.html "Working with Speech Recognition Grammar — OpenHRI Manual")

## Changelog

See [Releases page](https://github.com/azu/pronunciation-lexicon-specification-json/releases).

## Running tests

Install devDependencies and Run `npm test`:

npm i -d && npm test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/azu/pronunciation-lexicon-specification-json/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)

## License

MIT © azu