add threshold flag

pull/49/head
Chance Nelson 4 years ago
parent 244cc16eb6
commit 84f9aae897

@ -35,10 +35,12 @@ func main() {
var pulsepid int
var sourceName string
var unload bool
var threshold int
flag.IntVar(&pulsepid, "removerlimit", -1, "for internal use only")
flag.StringVar(&sourceName, "s", "", "Load PulseAudio source by name")
flag.BoolVar(&unload, "u", false, "Unload supressor")
flag.IntVar(&threshold, "t", -1, "voice activation threshold")
flag.Parse()
if pulsepid > 0 {
@ -69,6 +71,10 @@ func main() {
ui.config = readConfig()
ui.librnnoise = rnnoisefile
if threshold > 0 {
ui.config.Threshold = threshold
}
if unload {
paClient, err := pulseaudio.NewClient()
if err != nil {

Loading…
Cancel
Save