Skip to content

Commit

Permalink
added pronunciation dictionary node example
Browse files Browse the repository at this point in the history
  • Loading branch information
lharries committed Apr 26, 2024
1 parent 6cf6350 commit 6e83f0d
Show file tree
Hide file tree
Showing 8 changed files with 923 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/pronunciation-dictionaries/node/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ELEVENLABS_API_KEY=
3 changes: 3 additions & 0 deletions examples/pronunciation-dictionaries/node/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.mp3
node_modules
.env
20 changes: 20 additions & 0 deletions examples/pronunciation-dictionaries/node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Pronunciation Dictionary Node.js example

## How to run the code

1. Clone this repo
2. `cd elevenlabs-examples/examples/pronunciation-dictionaries/node`
3. Setup the environment variables
- `cp .env.example .env`
- Fill in the values
4. Install the dependencies

```bash
npm install # install the dependencies
```

5. Run the script

```bash
npm run start
```
16 changes: 16 additions & 0 deletions examples/pronunciation-dictionaries/node/dictionary.pls
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
alphabet="ipa" xml:lang="en-US">
<lexeme>
<grapheme>tomato</grapheme>
<phoneme>/tə'meɪtoʊ/</phoneme>
</lexeme>
<lexeme>
<grapheme>Tomato</grapheme>
<phoneme>/tə'meɪtoʊ/</phoneme>
</lexeme>
</lexicon>
Loading

0 comments on commit 6e83f0d

Please sign in to comment.