Files
swift-composable-architectu…/Examples/SpeechRecognition
Brandon Williams 1005bbd393 Signpost instrumentation of reducers (#142)
* Signpost higher-order reducer.

* cleanup

* guard

* clean up

* wip

* more

* wip

* wip

* wip

* clean up

* clean up

* wip

* run

* wip

* wip

* clean up

* Update Makefile

* No failures

* cleanup

* Update Makefile

* already guarded

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2020-05-27 10:22:10 -07:00
..
2020-05-03 22:26:28 -07:00

Speech Recognition

This application demonstrates how to work with a complex dependency in the Composable Architecture. It uses the SFSpeechRecognizer API from the Speech framework to listen to audio on the device and live-transcribe it to the UI.

The SFSpeechRecognizer class is a complex dependency, and if we used it freely in our application we wouldn't be able to test any of that code. So, instead, we wrap the API in a SpeechClient type that exposes Effects for accessing the underlying SFSpeechRecognizer class. Then we can use it in the reducer in an understandable way, and we can write tests for the reducer.