Skip to content

Commit

Permalink
Cut version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonvirissimo committed Apr 28, 2024
1 parent 4661214 commit 3874019
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
medieval_latina (2.1.2)
medieval_latina (3.0.0)
i18n

GEM
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ responsiveVoice.speak(sentence, "UK English Female");
```
### Generate lexicons to override text-to-speech pronunciation
```ruby
require 'aws-sdk-polly'
polly = Aws::Polly::Client.new
s3 = Aws::S3::Client.new

sentence = "PATER NOSTER qui es in caelis"

Expand All @@ -50,12 +50,24 @@ name = "CustomLatin"
polly.put_lexicon(name: name, content: lexicon.to_s)

# Synthesize speech using the lexicons
polly.synthesize_speech(
response = polly.synthesize_speech(
lexicon_names: [name],
text: sentence,
output_format: "mp3",
voice_id: "Joanna"
)

# Read the audio data and store it in a variable
audio_data = response.audio_stream.read

bucket_name = "foo"
object_key = "bar/pater-noster.mp3"

s3.put_object(
bucket: bucket_name,
key: object_key,
body: audio_data
)
```

### Latin langauge helper methods
Expand Down
2 changes: 1 addition & 1 deletion lib/medieval_latina/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class MedievalLatina
VERSION = "2.1.2".freeze
VERSION = "3.0.0".freeze
end

0 comments on commit 3874019

Please sign in to comment.