Head over to Settings -> Accessibility (located under Personalisation) -> Hearing. Scroll down to the bottom where you will find the option to enable the Baby crying detector mode.
Toggle the switch in the action bar to On position to enable the mode. After this, make sure to tap on the giant Play button on the screen to actually start the baby crying detector mode.
Make sure to keep the phone near the baby in a very silent room. To customise the notification settings, tap the overflow menu button on the top, followed by Settings. Here, you can select and customise the vibration intensity, vibration pattern and even enable the option to use the LED Flash as a notification.