Comments (9)
Seems interesting, but for now I'm going to focus on a big refactor of the code, so it's easier to add different notification types. I'll come back to this in a few weeks. :)
from noti.
Sure, just food for thought. :)
from noti.
All right. With the code refactored, this is definitely something we'll go after.
I've been working under the dev branch. In OS X, all Macs come with say
installed, which can synthesize speech. There is also an Objective-C library for that called NSSpeechSynthesizer.
Looks like the Linux and FreeBSD equivalent of that is eSpeak. Audibly needs the espeak
binary to be installed. I was thinking of bringing in the eSpeak library so noti
doesn't have to depend on espeak
being installed.
On the OS X side, I think speech notifications are basically ready. However, for Linux and FreeBSD there's a little more work that needs to be done. I have a working proof of concept, but I need to add a function to list available voices on the OS.
https://github.com/variadico/noti/blob/dev/espeak/espeak.go
from noti.
Awesome! I'll try to give the dev branch a spin soon.
from noti.
I had to add these two lines but now it talks! :)
diff --git a/espeak/espeak.go b/espeak/espeak.go
index 8b71e40..6f9425f 100644
--- a/espeak/espeak.go
+++ b/espeak/espeak.go
@@ -10,6 +10,8 @@ package espeak
/*
#cgo LDFLAGS: -lespeak
+#cgo freebsd CFLAGS: -I/usr/local/include
+#cgo freebsd LDFLAGS: -L/usr/local/lib
#include <stdlib.h>
#include <stdio.h>
``
from noti.
Woot! 👍
How'd you install libespeak on FreeBSD? I'm a total BSD n00b.
from noti.
All user packages are installed under /usr/local
, binary and from source (ports).
Since I don't need compile-time changes to eSpeak, I installed it as a binary package: pkg install espeak
(Some ports also split the headers into -dev
packages like Debian but this isn't the case here. pkg search ...
will usually help figure this out.)
from noti.
We have speech notifications now in v2!
https://github.com/variadico/noti/blob/master/CHANGELOG.md#added
$ go get -u github.com/variadico/noti
$ noti -speech -b=0 # trigger only speech notification
$ noti -speech # trigger speech and banner notifications
$ export NOTI_DEFAULT="speech" # make speech notifications default
$ noti # trigger only speech notification
from noti.
Also, I decided against bringing in the espeak library with cgo because that made it harder to compile noti
. We'll just look for the binary and if the user doesn't have it, noti
will print how to install it on Ubuntu or FreeBSD.
from noti.
Related Issues (20)
- Pushbullet has stopped working HOT 2
- Support Twilio SMS notification HOT 1
- how to send message to a user defined url HOT 5
- Automatically notify on all iTerm2 commands
- A detailed documentation to setup noti with the push notification providers on windows HOT 3
- Adding gotify as a push service HOT 1
- Windows Defender false positive? HOT 1
- github.com/variadico/vbs is no longer provided HOT 2
- Noti is not producing a notification on Mac os HOT 1
- Mute sound for specific notifications
- Unable to add exemption for noti when "focus" enabled. HOT 2
- Cant login
- On windows tail-format doesn't work
- Add support for ntfy HOT 1
- request feature
- RFE: Add support for telegram topics
- Add Teams as notification service
- 'NSUserNotification' is deprecated: first deprecated in macOS 11.0
- Add Discord as notification service HOT 2
- "Default" voice ("Alex") doesn't seem to exist anymore on macOS 14.2 HOT 4
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 noti.