Stop button in Speech in Php
Posted: 29 Sep 2020, 14:01
How are all things going CoursesWeb now with Covid-19.
It is shamble for all lovely lady`s who have the name.
I hope all Governements gonna make-up with those woman.
This script is functional but how can I add a stop button ????
Hope you can help me out....
It is shamble for all lovely lady`s who have the name.
I hope all Governements gonna make-up with those woman.
This script is functional but how can I add a stop button ????
Hope you can help me out....
Code: Select all
<?php
@$submit = $_POST['process'];
@$word = $_POST['texttospeech'];
$voice = new COM("SAPI.SpVoice");
if($_SERVER["REQUEST_METHOD"] == "POST" and isset($submit) and !empty($word)){
$voice->Speak($word);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<title>PHP Text to Speech</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="img/fav.png" type="image/png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div class="topmost">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-body">
<form method = "post">
<div class = "form-group">
<br>
<textarea class="form-control input-sm" rows="6" name="texttospeech" placeholder="Type your Text Here...">
<?php echo $users['post_text'];?>
</textarea>
<input type = "submit" class = "btn btn-primary" name="stop" value="stop">
</div>
<div class = "form-group">
<input type = "submit" class = "btn btn-primary btn-block" name="process" value="Speak">
</div>
</form>
<form method="post">
<input type="hidden" name="texttospeech" value="Congratulations, you run PHP text to Speech using Microsoft Speech API. Remember, this script will run only on Microsoft Windows">
<button type="submit" name="process" class="btn btn-danger btn-block">Click Me First</button>
</form>
</div>
</div>
</div>
</div>
<script src="js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>