Skip to contentSkip to conversation

mimic: new package

PATCH New Ezequiel Garcia 3 participants 4 messages Dec 10, 2016 – Dec 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mimic: new package

---
 package/Config.in        |  1 +
 package/mimic/Config.in  | 39 +++++++++++++++++++++++++++++++++++++++
 package/mimic/mimic.hash |  2 ++
 package/mimic/mimic.mk   | 30 ++++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 100644 package/mimic/Config.in
 create mode 100644 package/mimic/mimic.hash
 create mode 100644 package/mimic/mimic.mk
package/Config.in +1 -0
index c14575c4c44e..26fa01b00794 100644
@@ -22,6 +22,7 @@ menu "Audio and video applications"
 	source "package/kodi/Config.in"
 	source "package/lame/Config.in"
 	source "package/madplay/Config.in"
+	source "package/mimic/Config.in"
 	source "package/miraclecast/Config.in"
 	source "package/mjpegtools/Config.in"
 	source "package/modplugtools/Config.in"
package/mimic/Config.in new file +39 -0
new file mode 100644
index 000000000000..b4322a986401
@@ -0,0 +1,39 @@
+config BR2_PACKAGE_MIMIC
+	bool "mimic"
+        help
+          Mimic is a fast, lightweight Text-to-speech engine developed by
+          Mycroft A.I. and VocaliD, based on Carnegie Mellon University's
+          Flite (Festival-Lite) software. Mimic takes in text and reads it
+          out loud to create a high quality voice.
+
+          https://github.com/MycroftAI/mimic
+
+if BR2_PACKAGE_MIMIC
+
+choice
+	prompt "choose audio backend"
+	default BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE
+	bool "No sound backend, only produce wav files"
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA
+	bool "alsa"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
+	select BR2_PACKAGE_ALSA_LIB
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO
+	bool "alsa via portaudio"
+	select BR2_PACKAGE_PORTAUDIO
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO
+	bool "pulseaudio"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
+	depends on BR2_USE_MMU # pulseaudio
+	depends on !BR2_STATIC_LIBS # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
+	select BR2_PACKAGE_PULSEAUDIO
+
+endchoice
+
+endif # BR2_PACKAGE_MIMIC
package/mimic/mimic.hash new file +2 -0
new file mode 100644
index 000000000000..39d016548a41
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256	725003c9972d5b67c49d5ea6a89cb26b63414ff2c7adbbaf9200cf9eb55f80eb  mimic-1.1.0.tar.gz
package/mimic/mimic.mk new file +30 -0
new file mode 100644
index 000000000000..c5cc115af2ff
@@ -0,0 +1,30 @@
+################################################################################
+#
+# mimic
+#
+################################################################################
+
+MIMIC_VERSION = 1.1.0
+MIMIC_SITE = $(call github,MycroftAI,mimic,$(MIMIC_VERSION))
+MIMIC_INSTALL_STAGING = NO
+MIMIC_LICENSE = MIT
+MIMIC_LICENSE_FILES = LICENSE
+
+MIMIC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA),y)
+MIMIC_AUDIO_BACKEND = alsa
+MIMIC_DEPENDENCIES = alsa-lib
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO),y)
+MIMIC_AUDIO_BACKEND = portaudio
+MIMIC_DEPENDENCIES = portaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO),y)
+MIMIC_AUDIO_BACKEND = pulseaudio
+MIMIC_DEPENDENCIES = pulseaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE),y)
+MIMIC_AUDIO_BACKEND = none
+endif
+
+MIMIC_CONF_OPTS += --with-audio="$(MIMIC_AUDIO_BACKEND)"
+
+$(eval $(autotools-package))
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 mimic: new package

Hello,

Quoted 1 line · Ezequiel Garcia

I've applied, with a number of changes, see below.

package/mimic/Config.in line 7

Quoted 13 lines
package/mimic/Config.in new file +7 -0
new file mode 100644
index 000000000000..b4322a986401
@@ -0,0 +1,39 @@
+config BR2_PACKAGE_MIMIC
+	bool "mimic"
+        help
+          Mimic is a fast, lightweight Text-to-speech engine developed by
+          Mycroft A.I. and VocaliD, based on Carnegie Mellon University's
+          Flite (Festival-Lite) software. Mimic takes in text and reads it
+          out loud to create a high quality voice.

I rewrapped the help text so that it fits in 72 character lines.

package/mimic/Config.in line 14

Quoted 2 lines
package/mimic/Config.in new file +2 -0
+choice
+	prompt "choose audio backend"

Simplified to just "audio backend"

package/mimic/Config.in line 18

Quoted 4 lines
package/mimic/Config.in new file +4 -0
+	default BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE
+	bool "No sound backend, only produce wav files"

Simplified to "none", with an added help text.

package/mimic/Config.in line 23

Quoted 5 lines
package/mimic/Config.in new file +5 -0
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA
+	bool "alsa"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
+	select BR2_PACKAGE_ALSA_LIB

Changed to a "depends on BR2_PACKAGE_ALSA_LIB"

package/mimic/Config.in line 27

Quoted 4 lines
package/mimic/Config.in new file +4 -0
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO
+	bool "alsa via portaudio"
+	select BR2_PACKAGE_PORTAUDIO

Changed to a "depends on BR2_PACKAGE_PORTAUDIO"

package/mimic/Config.in line 35

Quoted 8 lines
package/mimic/Config.in new file +8 -0
+
+config BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO
+	bool "pulseaudio"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
+	depends on BR2_USE_MMU # pulseaudio
+	depends on !BR2_STATIC_LIBS # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
+	select BR2_PACKAGE_PULSEAUDIO

Changed to a "depends on BR2_PACKAGE_PULSEAUDIO", which avoids the need to replicate all the dependencies.

package/mimic/Config.in line 33

Quoted 3 lines
package/mimic/Config.in new file +3 -0
+MIMIC_VERSION = 1.1.0
+MIMIC_SITE = $(call github,MycroftAI,mimic,$(MIMIC_VERSION))
+MIMIC_INSTALL_STAGING = NO

I removed this line, as it's useless: it's the default.

package/mimic/Config.in

Quoted 8 lines
package/mimic/Config.in new file +8 -0
+MIMIC_LICENSE = MIT
+MIMIC_LICENSE_FILES = LICENSE
+
+MIMIC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA),y)
+MIMIC_AUDIO_BACKEND = alsa
+MIMIC_DEPENDENCIES = alsa-lib

Using = here is wrong: you basically ignore the host-pkgconf dependency defined above. So I've changed this to += here, and in the other cases below.

package/mimic/Config.in

Quoted 11 lines
package/mimic/Config.in new file +11 -0
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO),y)
+MIMIC_AUDIO_BACKEND = portaudio
+MIMIC_DEPENDENCIES = portaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO),y)
+MIMIC_AUDIO_BACKEND = pulseaudio
+MIMIC_DEPENDENCIES = pulseaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_NONE),y)
+MIMIC_AUDIO_BACKEND = none
+endif
+
+MIMIC_CONF_OPTS += --with-audio="$(MIMIC_AUDIO_BACKEND)"

Double quotes unneeded, so I dropped them.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 mimic: new package

In reply to Ezequiel Garcia
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ezequiel" == Ezequiel Garcia <[email protected]> writes:

Hi,

package/mimic/Config.in line 7

Quoted 7 lines
package/mimic/Config.in new file +7 -0
+config BR2_PACKAGE_MIMIC
+	bool "mimic"
+        help
+          Mimic is a fast, lightweight Text-to-speech engine developed by
+          Mycroft A.I. and VocaliD, based on Carnegie Mellon University's
+          Flite (Festival-Lite) software. Mimic takes in text and reads it
+          out loud to create a high quality voice.

Heh, "lightweight" - The tarball is more than 400MB!

Quoted 13 lines
package/mimic/mimic.mk new file +13 -0
+################################################################################
+#
+# mimic
+#
+################################################################################
+
+MIMIC_VERSION = 1.1.0
+MIMIC_SITE = $(call github,MycroftAI,mimic,$(MIMIC_VERSION))
+MIMIC_INSTALL_STAGING = NO
+MIMIC_LICENSE = MIT
+MIMIC_LICENSE_FILES = LICENSE
+
+MIMIC_DEPENDENCIES = host-pkgconf

package/mimic/mimic.mk line 23

Quoted 10 lines
package/mimic/mimic.mk new file +10 -0
+
+ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA),y)
+MIMIC_AUDIO_BACKEND = alsa
+MIMIC_DEPENDENCIES = alsa-lib
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO),y)
+MIMIC_AUDIO_BACKEND = portaudio
+MIMIC_DEPENDENCIES = portaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO),y)
+MIMIC_AUDIO_BACKEND = pulseaudio
+MIMIC_DEPENDENCIES = pulseaudio

configure.ac uses PKG_CHECK_MODULES to detect these, so we should depend on host-pkgconf - I've fixed that in git.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 mimic: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Hi,

Quoted 6 lines
Quoted 6 lines
package/mimic/mimic.mk new file +6 -0
+MIMIC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_ALSA),y)
+MIMIC_AUDIO_BACKEND = alsa
+MIMIC_DEPENDENCIES = alsa-lib
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PORTAUDIO),y)
Quoted 8 lines

package/mimic/mimic.mk line 23

Quoted 5 lines
package/mimic/mimic.mk new file +5 -0
+MIMIC_AUDIO_BACKEND = portaudio
+MIMIC_DEPENDENCIES = portaudio
+else ifeq ($(BR2_PACKAGE_MIMIC_AUDIO_BACKEND_PULSEAUDIO),y)
+MIMIC_AUDIO_BACKEND = pulseaudio
+MIMIC_DEPENDENCIES = pulseaudio

configure.ac uses PKG_CHECK_MODULES to detect these, so we should depend on host-pkgconf - I've fixed that in git.

Ehh, must have been -ENOCOFFEE. You indeed already have host-pkgconf, please ignore.

Signature · 1 line
Bye, Peter Korsgaard