Skip to content

A Docker image for a relatively light-weight full Arabic speech synthesis system

Notifications You must be signed in to change notification settings

nawarhalabi/festival-tts-arabic-voices-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

festival-tts-arabic-voices-docker

A Docker image for a relatively light-weight full Arabic speech synthesis system

Running the server

  1. Launch the server
$ git clone https://github.com/nawarhalabi/festival-tts-arabic-voices-docker
$ cd festival-tts-arabic-voices-docker
$ docker kill festival
$ docker rm festival
$ docker build -t festival-arabic:latest .
$ docker run -p 8080:8080 -v <wav files dir>:/tts --name festival festival-arabic:latest

This will take about 20 mins to finish. Bare in mind the <wav files dir> will contain the generated the wav files after sending the http request based on certain config below

  1. Configure Apache or any webserver to serve the static file directory <wav files dir> through http://<hostname or ip>/tts/
  2. Use the following JS and HTML as a template for creating a web interface for using the voice:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<textarea id="input-text" dir="rtl" name="arabic-text" rows="5" placeholder="Please enter Arabic text"></textarea>
<input id="tts-btn-mishkal" type="button" name="synthesise-mishkal" value="Synthesise (Mishkal as diacritiser)">
<input id="tts-btn-shakkala" type="button" name="synthesise-shakkala" value="Synthesise (Shakkala as diacritiser)">
<audio controls="">
       <source id="source" src="" type="audio/wav">
       Browser does not support this
</audio>
<script>
tts_server = 'http://<hostname or ip>/tts/';

$('#tts-btn-mishkal').on('click', function(e) {
        $.getJSON({
                url: 'http://<hostname or ip>:8080/mishkal/synth/url/' + $('#input-text').val(),
                data: '',
                success: function( data ) {
                        $('audio #source').attr('src', tts_server + data['url']);
                        $('audio').get(0).load();
                        $('audio').get(0).play();
                }
        });
});

$('#tts-btn-shakkala').on('click', function(e) {
        $.getJSON({
                url: 'http://<hostname or ip>:8080/shakkala/synth/url/' + $('#input-text').val(),
                data: '',
                success: function( data ) {
                        $('audio #source').attr('src', tts_server + data['url']);
                        $('audio').get(0).load();
                        $('audio').get(0).play();
                }
        });
});
</script>

Accessing the server

About

A Docker image for a relatively light-weight full Arabic speech synthesis system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published