Change sound generation for nightly to linux based
This commit is contained in:
@@ -17,27 +17,15 @@ mkdir -p ${workdir}/sdcard/horus/IMAGES
|
|||||||
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
|
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
|
||||||
|
|
||||||
# Request sound pack generation
|
# Request sound pack generation
|
||||||
wget -qO- http://winbox.open-tx.org/voice-builds/compile22.php?branch=${branch}
|
python3 -B ${workdir}/tts.py en csv files
|
||||||
|
python3 -B ${workdir}/tts.py fr csv files
|
||||||
# Get sounds
|
python3 -B ${workdir}/tts.py es csv files
|
||||||
cd sdcard
|
python3 -B ${workdir}/tts.py it csv files
|
||||||
wget http://winbox.open-tx.org/voice-builds/english-irish-taranis.zip
|
python3 -B ${workdir}/tts.py de csv files
|
||||||
wget http://winbox.open-tx.org/voice-builds/english-scottish-taranis.zip
|
|
||||||
wget http://winbox.open-tx.org/voice-builds/english-american-taranis.zip
|
|
||||||
wget http://winbox.open-tx.org/voice-builds/english-australian-taranis.zip
|
|
||||||
wget http://winbox.open-tx.org/voice-builds/french-taranis.zip
|
|
||||||
|
|
||||||
# Prepare the sdcard zip files for Horus
|
# Prepare the sdcard zip files for Horus
|
||||||
unzip english-irish-taranis.zip -d ${workdir}/sdcard/horus
|
mv /tmp/SOUNDS ${workdir}/sdcard/horus/
|
||||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-irish
|
|
||||||
unzip english-scottish-taranis.zip -d ${workdir}/sdcard/horus
|
|
||||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-scottish
|
|
||||||
unzip english-australian-taranis.zip -d ${workdir}/sdcard/horus
|
|
||||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-australian
|
|
||||||
unzip english-american-taranis -d ${workdir}/sdcard/horus
|
|
||||||
unzip french-taranis.zip -d ${workdir}/sdcard/horus
|
|
||||||
wget -O ${workdir}/sdcard/horus/SOUNDS/en/english.csv http://winbox.open-tx.org/voice-builds/english-american-taranis.csv
|
|
||||||
wget -O ${workdir}/sdcard/horus/SOUNDS/fr/french.csv http://winbox.open-tx.org/voice-builds/french-taranis.csv
|
|
||||||
|
|
||||||
# Duplicate for Taranis and create sdcards.zip
|
# Duplicate for Taranis and create sdcards.zip
|
||||||
mkdir ${workdir}/sdcard/taranis/SOUNDS
|
mkdir ${workdir}/sdcard/taranis/SOUNDS
|
||||||
|
|||||||
Executable
+48
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
branch=next
|
||||||
|
workdir=/home/opentx/nightly22
|
||||||
|
output=/var/www/html/2.2/nightly
|
||||||
|
|
||||||
|
cd ${workdir}
|
||||||
|
|
||||||
|
# Copy git sdcard data
|
||||||
|
rm -Rf ${workdir}/sdcard
|
||||||
|
cp -r ${workdir}/code/radio/sdcard .
|
||||||
|
|
||||||
|
# Get images for Horus
|
||||||
|
mkdir -p ${workdir}/sdcard/horus/IMAGES
|
||||||
|
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
|
||||||
|
|
||||||
|
# Request sound pack generation
|
||||||
|
wget -qO- http://winbox.open-tx.org/voice-builds/compile22.php?branch=${branch}
|
||||||
|
|
||||||
|
# Get sounds
|
||||||
|
cd sdcard
|
||||||
|
wget http://winbox.open-tx.org/voice-builds/english-irish-taranis.zip
|
||||||
|
wget http://winbox.open-tx.org/voice-builds/english-scottish-taranis.zip
|
||||||
|
wget http://winbox.open-tx.org/voice-builds/english-american-taranis.zip
|
||||||
|
wget http://winbox.open-tx.org/voice-builds/english-australian-taranis.zip
|
||||||
|
wget http://winbox.open-tx.org/voice-builds/french-taranis.zip
|
||||||
|
|
||||||
|
# Prepare the sdcard zip files for Horus
|
||||||
|
unzip english-irish-taranis.zip -d ${workdir}/sdcard/horus
|
||||||
|
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-irish
|
||||||
|
unzip english-scottish-taranis.zip -d ${workdir}/sdcard/horus
|
||||||
|
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-scottish
|
||||||
|
unzip english-australian-taranis.zip -d ${workdir}/sdcard/horus
|
||||||
|
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-australian
|
||||||
|
unzip english-american-taranis -d ${workdir}/sdcard/horus
|
||||||
|
unzip french-taranis.zip -d ${workdir}/sdcard/horus
|
||||||
|
wget -O ${workdir}/sdcard/horus/SOUNDS/en/english.csv http://winbox.open-tx.org/voice-builds/english-american-taranis.csv
|
||||||
|
wget -O ${workdir}/sdcard/horus/SOUNDS/fr/french.csv http://winbox.open-tx.org/voice-builds/french-taranis.csv
|
||||||
|
|
||||||
|
# Duplicate for Taranis and create sdcards.zip
|
||||||
|
mkdir ${workdir}/sdcard/taranis/SOUNDS
|
||||||
|
cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis/
|
||||||
|
rm -f ${workdir}/sdcard/*.zip
|
||||||
|
cd ${workdir}/sdcard/taranis && zip -r ${output}/sdcard/sdcard-taranis.zip *
|
||||||
|
cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/sdcard-horus.zip *
|
||||||
|
rm -Rf ${workdir}/sdcard
|
||||||
Executable
+104
@@ -0,0 +1,104 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
# This script is a modified version to support Linux TTS fiel genration using PicoTTS
|
||||||
|
|
||||||
|
# Sound pack maintainers (incomplete list) by language alphabetical order
|
||||||
|
# Czech : Martin Hotar
|
||||||
|
# French : Bertrand Songis & André Bernet
|
||||||
|
# English : Rob Thompson & Martin Hotar
|
||||||
|
# German : Romolo Manfredini (Some corrections by Peer)
|
||||||
|
# Italian : Romolo Manfredini
|
||||||
|
# Portuguese : Romolo Manfredini
|
||||||
|
# Spanish : Romolo Manfredini (With the help of Jose Moreno)
|
||||||
|
|
||||||
|
# from __future__ import print_function
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import zipfile
|
||||||
|
from tts_common import *
|
||||||
|
board = "taranis"
|
||||||
|
|
||||||
|
lib_path = os.path.abspath(os.path.join('..', '..', 'radio', 'util'))
|
||||||
|
sys.path.append(lib_path)
|
||||||
|
|
||||||
|
def generate(str, filename):
|
||||||
|
|
||||||
|
command = "pico2wave -l=" + voice + " -w=" + filename + " \"" + str + "\""
|
||||||
|
os.system(command.encode('utf-8'))
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
|
||||||
|
if "en" in sys.argv:
|
||||||
|
from tts_en import systemSounds, sounds
|
||||||
|
|
||||||
|
directory = "en"
|
||||||
|
voice = "en-US"
|
||||||
|
|
||||||
|
elif "fr" in sys.argv:
|
||||||
|
from tts_fr import systemSounds, sounds
|
||||||
|
|
||||||
|
directory = "fr"
|
||||||
|
voice = "fr-FR"
|
||||||
|
|
||||||
|
elif "it" in sys.argv:
|
||||||
|
from tts_it import systemSounds, sounds
|
||||||
|
|
||||||
|
directory = "it"
|
||||||
|
voice = "it-IT"
|
||||||
|
|
||||||
|
elif "de" in sys.argv:
|
||||||
|
from tts_de import systemSounds, sounds
|
||||||
|
|
||||||
|
directory = "de"
|
||||||
|
voice = "de-DE"
|
||||||
|
|
||||||
|
elif "es" in sys.argv:
|
||||||
|
from tts_es import systemSounds, sounds
|
||||||
|
|
||||||
|
directory = "es"
|
||||||
|
voice = "es-ES"
|
||||||
|
|
||||||
|
else:
|
||||||
|
print("which language?")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
if "csv" in sys.argv:
|
||||||
|
path = "/tmp/SOUNDS/" + directory + "/SYSTEM/"
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
os.chdir(path)
|
||||||
|
with open("%s-%s.csv" % (voice, board), "wb") as csvFile:
|
||||||
|
for s, f in systemSounds:
|
||||||
|
if s and f:
|
||||||
|
l = u""
|
||||||
|
if board in ("sky9x", "taranis"):
|
||||||
|
l += u"SOUNDS/%s/SYSTEM;" % directory
|
||||||
|
l += f + u";" + s + u"\n"
|
||||||
|
csvFile.write(l.encode("utf-8"))
|
||||||
|
for s, f in sounds:
|
||||||
|
if s and f:
|
||||||
|
l = u""
|
||||||
|
if board in ("sky9x", "taranis"):
|
||||||
|
l += u"SOUNDS/%s;" % directory
|
||||||
|
l += f + u";" + s + u"\n"
|
||||||
|
csvFile.write(l.encode("utf-8"))
|
||||||
|
|
||||||
|
if "files" in sys.argv:
|
||||||
|
path = "/tmp/SOUNDS/" + directory + "/SYSTEM/"
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
os.chdir(path)
|
||||||
|
for s, f in systemSounds:
|
||||||
|
if s and f:
|
||||||
|
generate(s, f)
|
||||||
|
os.chdir("..")
|
||||||
|
for s, f in sounds:
|
||||||
|
if s and f:
|
||||||
|
generate(s, f)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
NO_ALTERNATE = 1024
|
||||||
|
PROMPT_CUSTOM_BASE = 256
|
||||||
|
PROMPT_SYSTEM_BASE = 0
|
||||||
|
board = "taranis"
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def filename(idx, alternate=0):
|
||||||
|
ext = ".wav"
|
||||||
|
if isinstance(idx, int):
|
||||||
|
result = "%04d%s" % (idx, ext)
|
||||||
|
elif board in ('sky9x', 'taranis'):
|
||||||
|
result = idx + ext
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user