Comments (8)
Hey @utkarsh2102, so I think for this, it would be enough for the library to provide the amplitude
option, mentioned in the command line options here, which you could then further use in your script.
@dejan it's just a matter of adding support for the -a
option in the ESpeak::Speech
module which I would be happy to do.
I hacked around a bit locally and the diff came out to look like the following:
diff --git a/lib/espeak/speech.rb b/lib/espeak/speech.rb
index f682905..c8e4ca5 100644
--- a/lib/espeak/speech.rb
+++ b/lib/espeak/speech.rb
@@ -12,6 +12,7 @@ module ESpeak
# :speed - speed in words per minute, 80 to 370
# :capital - increase emphasis of capitalized letters by raising pitch by this amount
# no range given in man but good range is 10-40 to start
+ # :amplitude - amplitude adjustment, 0 to 200
# :quiet - remove printing to stdout. Affects only lame (default false)
#
def initialize(text, options = {})
@@ -73,12 +74,13 @@ module ESpeak
pitch: 50,
speed: 170,
capital: 1,
+ amplitude: 100,
quiet: true }
end
def espeak_command(options, flags = '')
['espeak', @text.to_s, flags.to_s, "-v#{options[:voice]}", "-p#{options[:pitch]}", "-k#{options[:capital]}",
- "-s#{options[:speed]}"]
+ "-s#{options[:speed]}", "-a#{options[:amplitude]}"]
end
def std_lame_command(options)
PS: thanks to @rajudev for pointing the issue in @utkarsh2102's repository, which prompted me to contribute to this repository!
from espeak-ruby.
This is now available in just released v1.1.0. Thank you @utkarsh2102 and @Animesh-Ghosh.
from espeak-ruby.
Hi @dejan,
This is now available in just released v1.1.0.
Awesome, thank you very much! Can you please re-trigger the CI? It's weirdly failing on the last commit. :(
Hopefully just re-running the pipeline should suffice.
from espeak-ruby.
Hey @Animesh-Ghosh,
This is greatttt! Thank you! \o/
from espeak-ruby.
Hey @dejan, could you possibly take a look at this quick bug fix? This shall help us respect the system's volume whilst using the gem. TIA! :)
from espeak-ruby.
it's just a matter of adding support for the -a option in the ESpeak::Speech module which I would be happy to do.
@Animesh-Ghosh please create a PR and I'll merge
from espeak-ruby.
Yay, thank you! ❤️
from espeak-ruby.
@Animesh-Ghosh please create a PR and I'll merge
@dejan PR #22 created. Please check it out, thanks!
from espeak-ruby.
Related Issues (10)
- Espeak leaves Zombie processes after conversion HOT 1
- Test failures with Ruby2.7 HOT 1
- New release? HOT 1
- Live Demo isn't Working HOT 1
- Cannot load such file HOT 1
- [Question] Is there a way to generate different voices in one file?
- Saving to a specific location?
- Error when using speak method off Speech instance
- Improper text validation enables you to read ENV variables HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espeak-ruby.