title: Flutter Text To Speech: Speak several strings subsequently with different SpeechRates
body: <p>I have a problem with the Flutter Text To Speech package.
  When clicking on a FloatingActionButton I would like to speak/play several Strings (with different Speechrates) subsequently. However, when doing so, I can only hear the last string that I have passed onto the function and not the first one.</p>
  
  <p>As you can see in the code below, I have tried to make use of the asynchronus programming (async / await). </p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'dart:async';
  import 'package:flutter_tts/flutter_tts.dart';
  
  class SpeakerClass extends StatefulWidget{
    @override
    State&lt;StatefulWidget&gt; createState() {
    // TODO: implement createState
    return _SpeakerClassState();
    }
  }
  
  class _SpeakerClassState extends State&lt;SpeakerClass&gt;{
    String text1 = 'eins';
    String text2 = 'zwei';
    String text3 = 'drei';
    String text4 = 'vier';
    String currentTtsString;
    double ttsSpeechRate1 = 0.5;
    double ttsSpeechRate2 = 1.0;
    double currentSpeechRate;
  
  
    Future playTtsString1() async {
      currentTtsString = text1;
      currentSpeechRate = ttsSpeechRate1;
      await runTextToSpeech(currentTtsString, currentSpeechRate);
      return null;
    }
  
    Future playTtsString2() async {
      currentTtsString = text2;
      currentSpeechRate = ttsSpeechRate2;
      await runTextToSpeech(currentTtsString, currentSpeechRate);
      return null;
    }
  
    @override
    Widget build(BuildContext context) {
    return Scaffold(
      body: FloatingActionButton (
        backgroundColor: Colors.blue,
        child: Icon(Icons.volume_up, color: Colors.white),
        onPressed: () async {
          await playTtsString1();
          await playTtsString2();
        },
      )
    );
    }
  
  }
  
  
  Future&lt;void&gt; runTextToSpeech(String currentTtsString, double currentSpeechRate) async {
    FlutterTts flutterTts;
    flutterTts = new FlutterTts();
    await flutterTts.setLanguage("en-GB");
    await flutterTts.setVolume(1.0);
    await flutterTts.setPitch(1.0);
    await flutterTts.isLanguageAvailable("en-GB");
    await flutterTts.setSpeechRate(currentSpeechRate);
    await flutterTts.speak(currentTtsString);
  }
  </code></pre>
  
  <p>When pressing the FloatingActionButton I expect the program to first carry out the function playTtsString1 ("eins" with a speed of 0.5) and afterwards the function playTtsString2 ("zwei" with a speed of 1).</p>
  
  <p>However, somehow I can only hear the program saying "zwei". I guess the program is not waiting for the first function "playTtsString1" to be finished and already carries out the second function "playTtsString2". I would really appreciate any help on this matter!</p>