JarvisTTS::speak()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace JarvisPHP\Core;
4
5
/**
6
 * JarvisTTS
7
 * 
8
 * Class for interact with the choosen TTS
9
 * @author Stefano Bianchini
10
 * @website http://www.stefanobianchini.net
11
 */
12
class JarvisTTS {
13
    
14
    /**
15
     * Speak the sentence
16
     * @param string $sentence
17
     */
18
    public static function speak($sentence) {
19
        JarvisPHP::getLogger()->info('JarvisPHP says with '.JarvisPHP::$TTS_name.': "'.$sentence.'"');
20
        $JarvisTTS = 'JarvisPHP\Speakers\\'.JarvisPHP::$TTS_name;
21
        $JarvisTTS::speak($sentence);
22
    }
23
    
24
}
25