Skip to content

Added Volume Support#8

Open
ColinCreamer wants to merge 1 commit intogoing-digital:masterfrom
ColinCreamer:master
Open

Added Volume Support#8
ColinCreamer wants to merge 1 commit intogoing-digital:masterfrom
ColinCreamer:master

Conversation

@ColinCreamer
Copy link

Hey @going-digital. Love your library. I added volume some control functionality. It would be great if you could check it out and possibly pull it back into the main branch so others can benefit too.

Usage example:
voice.setVol(50); //Set the volume to 50%
voice.setVol(100); //Set the volume to 100%, original output

It takes one parameter, which is the desired volume in percent, 0-255. A
value of 100 will output the 'Max' volume, which is the normal volume
outputted by the recording. A value of zero is mute, and a value
greater then 100 will actually boost the original volume.

Careful when boosting, if you go too high, the audio will distort/muffle as
the waveform hits the roof and starts to clip. I found higher then 180% was counter productive, but it really depends on how loud the original clip was.

You may now set the output volume digitally using the added setVol()
function.

It takes one parameter, which is the desired volume in percent, 0-255. A
value of 100 will output the 'Max' volume, which is the normal volume
outputted by the recording.  A value of zero is mute, and a value
greater then 100 will actually boost the original volume.

Careful when boosting, if you go to high, the audio will distort when
the waveform peaks hit the roof and gets clipped off.
@Wintermute3
Copy link

Hi Colin - I am getting interested in speech on the Arduino, in my case a Pololu A-Star 32U4 Prime. I will start by incorporating your patch to the base project - thanks! My first Arduino project (but I do have a microcontroller background)...

@ColinCreamer
Copy link
Author

Cool. Thanks for the line Michael. Glad to see an interest in my patch. Have you started on your project yet? @Wintermute3

@Wintermute3
Copy link

Hi @ColinCreamer - yes, I checked my stuff in a week or two ago. Check it out at: https://github.com/Wintermute3/Talkie

SD card support for large libraries is the big thing (and the port to A-Star).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants