NiFi + Mac Dictation: Retrieving real-time quotes on voice commands
- Nov 30, 2026 10:32 AM UTC
- 2 replies
- 6377 views
- Translate All
Prerequisite:
1) Assuming you already have latest version of NiFi [0.5.x or later] downloaded on your Mac.
2) Make sure you have Mac dictation feature, and its working!
Steps:
1) Use GetHttp processor to Retrieve any Stock price from “Google Finance”, you can use the below URL to fetch YAHOO stock price:
http://finance.google.com/finance/info?client=ig&q=YHOO
- Processor Properties would look like:

2) Use ReplaceText and EvaluateJsonPath processors to trim json result and extract stock value and variation in stock price today. Use UpdateAttribute processor to save values to attributes.
3) Now you can use a RouteOnAttribute to decide when to trigger mail or/and give voice feedback.
4) Finally Use PutEmail processor for email Alert and/or Use ExecuteStreamCommand for voice feedback using Mac OS X’s “say” command, values can be extracted from attributes.
I am Attaching my flow template, which will help you understand better.
retrieving-real-time-quotes.xml
5) you may dry run the flow to see if it works as expected!
6) Now we have to link Mac Dictation to communicate with NiFi. For that we have to create custom commands in Dictation that fire NiFi API calls to make changes in the GetHttp processor based on the stock requested via voice command. [Now you would be thinking about better Speech recognition software 😉 ]
A Sample API call to update processor based on command would look like [update it with your processor-ids and client-ids]:
curl -i -X PUT -H 'Content-Type: application/json' -d '{"revision":{"version":176,"clientId":"93a9b515-1643-4ccf-8db1-71ef38238ae5"},"processor":{"id":"7f033b6f-e13e-4295-85de-33444aae6c4b","parentGroupId":"02888a59-ee2b-483e-8860-b0fdf948de97","config":{"properties":{"URL":"http://finance.google.com/finance/info?client=ig&q=AAPL","Filename":"APPLE"}}}}' http://localhost:8080/nifi-api/controller/process-groups/02888a59-ee2b-483e-8860-b0fdf948de97/processors/7f033b6f-e13e-4295-85de-33444aae6c4b
7) Now you can launch Dictation and try out!!
Thanks,
Jobin George

