# Next Steps

Once you have the Google Assistant running on your project, give these a try:

1. [Customize](https://developers.google.com/assistant/sdk/guides/service/python/embed/next-steps#custom-interaction) how your project interacts with the
   Assistant. For example, trigger the Assistant with the push of a button or
   blink an LED when playing back audio. You can even show a speech recognition
   transcript from the Assistant on a display.

2. [Control](https://developers.google.com/assistant/sdk/guides/service/python/embed/next-steps#device-control) your project with custom commands.
   For example, ask your Assistant-enabled [mocktail maker](http://deeplocal.com/mocktailsmixer/)
   to make your favorite drink.

## Customize how your project interacts with the Assistant

### Trigger the Assistant

With the Google Assistant Service API, you control when to trigger an Assistant
request. Modify the [sample code](https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/grpc)
to control this (for example, at the push of a button). Triggering
an Assistant request is done by sending a request to [`EmbeddedAssistant.Assist`](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#google.assistant.embedded.v1alpha2.EmbeddedAssistant.Assist).

### Get the transcript of the user request

The Google Assistant SDK gives you a text transcript of the user request. Use
this to provide feedback to the user by rendering the text to a display, or even
for something more creative such as performing some local actions on the device.

This transcript is located in the [`SpeechRecognitionResult.transcript`](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#speechrecognitionresult) field.

### Get the text of the Assistant's response

The Google Assistant SDK gives you the plain text of the Assistant response. Use this
to provide feedback to the user by rendering the text to a display.

This text is located in the [`DialogStateOut.supplemental_display_text`](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#dialogstateout)
field.

### Get the Assistant's visual response

The Google Assistant SDK supports rendering the Assistant response to a
display in the case of visual responses to certain queries. For example,
the query *What is the weather in Mountain View?* will render the current
temperature, a pictorial representation of the weather, and suggestions for
related queries. This HTML5 data (if present) is located in the
[`ScreenOut.data`](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#screenout) field if this feature is [enabled](https://developers.google.com/assistant/sdk/guides/service/integrate#text-response).

This can be enabled in the `pushtotalk.py` and `textinput.py` [samples](https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/grpc)
with the `--display` command line flag. The data is rendered in a browser window.

> [!NOTE]
> **Note:** If you are sending commands over SSH to a Raspberry Pi with a connected display, make sure you run `export DISPLAY=:0` before running the sample with the `--display` command line flag.

### Submitting queries via text input

If you have a text interface (for example, a keyboard) attached to the device,
set the `text_query` field in the `config` field (see [`AssistConfig`](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha2#assistconfig)).
Do not set the `audio_in_config` field.

The [sample code](https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/grpc)
includes the file `textinput.py`. You can run this file to submit queries via
text input.

### Submitting queries via audio file input

The [sample code](https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/grpc)
includes the file `audiofileinput.py`. You can run this file to submit a query
via an audio file. The sample outputs an audio file with the Assistant's response.

## Control your project with custom commands

You can add custom commands to the Assistant that allow you to control your
project via voice.

Here are two ways to do this:

- Extend the Google Assistant Service sample to include [Device Actions](https://developers.google.com/assistant/sdk/guides/service/python/extend/install-hardware).

- Create an [IFTTT recipe](https://support.google.com/googlehome/answer/7194656)
  for the Assistant. Then configure IFTTT to make a custom HTTP request to an
  endpoint you choose in response to an Assistant command. To do so, use
  [Maker IFTTT actions](http://maker.ifttt.com).