This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
77 lines (67 loc) · 3.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8">
<title>Angular Speech</title>
<meta name="author" content="codekraft-studio">
<meta name="description" content="Expect us, we are coming, the new full qualified web developers duo.">
<meta name="Robots" content="ALL,INDEX">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta property="og:title" content="codekraft-studio, cutting edge programming!" />
<meta property="og:description" content="Expect us, we are coming, the new full qualified web developers duo" />
<meta property="og:image" content="http://core.codekraft.it/www.codekraft.it/quadkode.jpg" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.codekraft.it/" />
<meta property="og:site_name" content="codekraft-studio, cutting edge programming!" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="stylesheet" href="dist/angular-speech.css">
<link rel="stylesheet" href="style.css">
</head>
<body ng-controller="MainCtrl" ng-cloak>
<header class="navbar navbar-light bg-light">
<div class="container">
<div class="navbar-brand d-flex align-items-center">
<div class="mr-4">
<angular-speech lang="it-IT" on-text="speechCallback(content)"></angular-speech>
</div>
<div class="navbar-logo">
<h1 class="m-0 title">Angular Speech</h1>
<h2 ng-bind="description" class="description">easy integration for SpeechRecognition browser API</h2>
</div>
</div>
</div>
<a href="https://github.com/codekraft-studio/angular-speech"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"></a>
</header>
<main class="container">
<div class="d-flex justify-content-between mb-4">
<span>Press the button and speak</span>
<span>Total words: {{ getWords() }} </span>
</div>
<div class="result-container">
<p class="lead" ng-bind="content"></p>
</div>
</main>
<footer class="footer fixed-bottom bg-light">
<div class="container text-center">
Made with ♥ by <a href="https://github.com/codekraft-studio">codekraft-studio</a>
</div>
</footer>
</body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular.min.js"></script>
<script type="text/javascript" src="dist/angular-speech.min.js"></script>
<script type="text/javascript">
angular.module('app', ['angular-speech'])
.controller('MainCtrl', function($scope) {
$scope.title = 'angular-speech'
$scope.description = 'easy integration for SpeechRecognition browser API'
$scope.content = '';
$scope.speechCallback = function(event) {
$scope.content = event;
}
$scope.getWords = function() {
return $scope.content.match(/\S+/g) ? $scope.content.match(/\S+/g).length : 0;
}
});
</script>
</html>