<commit_before>﻿# [App Logic](../) > Output

In this section, you will learn how to use Jovo to craft a response to your users.

* [Introduction to Output Types](#introduction-to-output-types)
* [Basic Output](#basic-output)
  * [tell](#tell)
  * [ask](#ask)
  * [repeat](#repeat)
* [Advanced Output](#advanced-output)
  * [SSML](#ssml)
  * [speechBuilder](#speechbuilder)
  * [i18n](#i18n)
  * [Raw JSON Responses](#raw-json-responses)
* [Visual Output](#visual-output)
* [No Speech Output](#no-speech-output)

## Introduction to Output Types

What do users expect from a voice assistant? Usually, it's either direct or indirect output in form of speech, audio, or visual information. In this section, you will learn more about basic output types like [`tell`](#tell), [`ask`](#ask), but also how to use SSML or the Jovo [speechBuilder](#speechbuilder) to create more advanced output elements.


## Basic Output

Jovo's basic output options offer simple methods for interacting with users through text-to-speech. If you're interested in more, take a look at [Advanced Output](#advanced-output).

### tell

The tell method is used to have Alexa or Google Home say something to your users. You can either use plain text or [SSML](#ssml) (Speech Synthesis Markup Language).

Important: The session ends after a `tell` method, this means the mic is off and there is no more interaction between the user and your app until the user invokes it again. [Learn more about sessions here](../01_routing#introduction-to-user-sessions  './routing#introduction-to-user-sessions').

```javascript
this.tell(speech);

// Use plain text as speech output
this.tell('Hello World!');

// Use SSML as speech output
this.tell('<speak>Hello <say-as interpret-as="spell-out">World</say-as></speak>');
```


### ask

Whenever you want to make the experience more interactive and get some user input, the `ask` method is the way to go.

This method keeps the mic open ([learn more about sessions here](../01_routing/README.md#introduction-to-user-sessions  './routing#introduction-to-user-sessions')), meaning the speech element is used initially to ask the user for some input. If there is no response, the reprompt is used to ask again.

```javascript
this.ask(speech, reprompt);

this.ask('How old are you?', 'Please tell me your age');
```

You can also use [SSML](#ssml) for your speech and reprompt elements.

#### Multiple Reprompts

Google Assistant offers the functionality to use multiple reprompts.

```javascript
this.ask(speech, [reprompt1, reprompt2, goodbyeMessage]);
```

You can find more detail about this feature here: [Platform Specific Features > Google Assistant > Multiple Reprompts](../../05_platform-specifics/google-assistant/README.md#multiple-reprompts './google-assistant#multiple-reprompts').

### repeat

It is recommended to use a `'RepeatIntent'` (e.g. the `'AMAZON.RepeatIntent'`) that allows users to ask your app to repeat the previous output if they missed it.

```javascript
this.repeat();

// Example
'RepeatIntent' function() {<commit_msg>🔀 Merge pull request #177 from ssfinney/ssfinney-fix-typo<commit_after>﻿# [App Logic](../) > Output

In this section, you will learn how to use Jovo to craft a response to your users.

* [Introduction to Output Types](#introduction-to-output-types)
* [Basic Output](#basic-output)
  * [tell](#tell)
  * [ask](#ask)
  * [repeat](#repeat)
* [Advanced Output](#advanced-output)
  * [SSML](#ssml)
  * [speechBuilder](#speechbuilder)
  * [i18n](#i18n)
  * [Raw JSON Responses](#raw-json-responses)
* [Visual Output](#visual-output)
* [No Speech Output](#no-speech-output)

## Introduction to Output Types

What do users expect from a voice assistant? Usually, it's either direct or indirect output in form of speech, audio, or visual information. In this section, you will learn more about basic output types like [`tell`](#tell), [`ask`](#ask), but also how to use SSML or the Jovo [speechBuilder](#speechbuilder) to create more advanced output elements.


## Basic Output

Jovo's basic output options offer simple methods for interacting with users through text-to-speech. If you're interested in more, take a look at [Advanced Output](#advanced-output).

### tell

The tell method is used to have Alexa or Google Home say something to your users. You can either use plain text or [SSML](#ssml) (Speech Synthesis Markup Language).

Important: The session ends after a `tell` method, this means the mic is off and there is no more interaction between the user and your app until the user invokes it again. [Learn more about sessions here](../01_routing#introduction-to-user-sessions  './routing#introduction-to-user-sessions').

```javascript
this.tell(speech);

// Use plain text as speech output
this.tell('Hello World!');

// Use SSML as speech output
this.tell('<speak>Hello <say-as interpret-as="spell-out">World</say-as></speak>');
```


### ask

Whenever you want to make the experience more interactive and get some user input, the `ask` method is the way to go.

This method keeps the mic open ([learn more about sessions here](../01_routing/README.md#introduction-to-user-sessions  './routing#introduction-to-user-sessions')), meaning the speech element is used initially to ask the user for some input. If there is no response, the reprompt is used to ask again.

```javascript
this.ask(speech, reprompt);

this.ask('How old are you?', 'Please tell me your age');
```

You can also use [SSML](#ssml) for your speech and reprompt elements.

#### Multiple Reprompts

Google Assistant offers the functionality to use multiple reprompts.

```javascript
this.ask(speech, [reprompt1, reprompt2, goodbyeMessage]);
```

You can find more detail about this feature here: [Platform Specific Features > Google Assistant > Multiple Reprompts](../../05_platform-specifics/google-assistant/README.md#multiple-reprompts './google-assistant#multiple-reprompts').

### repeat

It is recommended to use a `'RepeatIntent'` (e.g. the `'AMAZON.RepeatIntent'`) that allows users to ask your app to repeat the previous output if they missed it.

```javascript
this.repeat();

// Example
'RepeatIntent': function() {
{'fraction_non_alphanumeric': 0.11929140256785307, 'fraction_numerical': 0.004388103364212579, 'mean_word_length': 4.805660377358491, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3382860', 'n_tokens_mistral': 1873, 'n_tokens_neox': 1730, 'n_words': 726}