mirror of
https://github.com/FluidInference/FluidAudio.git
synced 2026-05-12 20:20:36 +00:00
Update ESpeak and hard fail if missing (#148)
### Why is this change needed? <!-- Explain the motivation for this change. What problem does it solve? --> Rebuilt ESpeak to support macos 14 + iOS17+, using our forked version here https://github.com/FluidInference/espeak-ng/releases/tag/xcframework%2F1.52.0 - this makes it easier to maintain. Also removed x86 (intel chips) from the support framework. we dont need it - Removed the fallbacks in the path and hard fail when the bundling fails
This commit is contained in:
@@ -99,6 +99,8 @@ FluidAudioDatasets/
|
||||
Resources/
|
||||
!Sources/FluidAudio/Resources/
|
||||
!Sources/FluidAudio/Resources/**
|
||||
!Sources/FluidAudio/Frameworks/ESPeakNG.xcframework/**/Resources/
|
||||
!Sources/FluidAudio/Frameworks/ESPeakNG.xcframework/**/Resources/**
|
||||
scripts/
|
||||
Documentation/parakeet-tdt/
|
||||
docs/parakeet-tdt/
|
||||
|
||||
+15
-1
@@ -35,11 +35,25 @@ Pod::Spec.new do |spec|
|
||||
# macOS builds include: ASR, Diarization, VAD, and TTS with ESpeakNG support.
|
||||
spec.osx.vendored_frameworks = "Sources/FluidAudio/Frameworks/ESpeakNG.xcframework"
|
||||
spec.osx.frameworks = "CoreML", "AVFoundation", "Accelerate", "Cocoa"
|
||||
spec.osx.pod_target_xcconfig = {
|
||||
'ARCHS[sdk=macosx*]' => 'arm64',
|
||||
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64'
|
||||
}
|
||||
spec.osx.user_target_xcconfig = {
|
||||
'ARCHS[sdk=macosx*]' => 'arm64',
|
||||
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64'
|
||||
}
|
||||
|
||||
|
||||
spec.swift_versions = ["5.10"]
|
||||
|
||||
# Enable module definition for proper framework imports
|
||||
spec.user_target_xcconfig = {
|
||||
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64'
|
||||
}
|
||||
|
||||
spec.pod_target_xcconfig = {
|
||||
'DEFINES_MODULE' => 'YES'
|
||||
'DEFINES_MODULE' => 'YES',
|
||||
'EXCLUDED_ARCHS[sdk=macosx*]' => 'x86_64'
|
||||
}
|
||||
end
|
||||
|
||||
+4
-4
@@ -4,8 +4,8 @@ import PackageDescription
|
||||
let package = Package(
|
||||
name: "FluidAudio",
|
||||
platforms: [
|
||||
.macOS(.v13),
|
||||
.iOS(.v16),
|
||||
.macOS(.v14),
|
||||
.iOS(.v17),
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
@@ -15,7 +15,7 @@ let package = Package(
|
||||
.executable(
|
||||
name: "fluidaudio",
|
||||
targets: ["FluidAudioCLI"]
|
||||
),
|
||||
)
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
@@ -29,7 +29,7 @@ let package = Package(
|
||||
"ESpeakNG"
|
||||
],
|
||||
path: "Sources/FluidAudio",
|
||||
exclude: []
|
||||
exclude: ["Frameworks"]
|
||||
),
|
||||
.executableTarget(
|
||||
name: "FluidAudioCLI",
|
||||
|
||||
@@ -170,7 +170,6 @@ public final class AsrManager {
|
||||
cellState: decoderState.cellState
|
||||
)
|
||||
|
||||
// Compat helper awaits async prediction when available without breaking older SDKs.
|
||||
let initDecoderOutput = try await decoderModel.compatPrediction(
|
||||
from: initDecoderInput,
|
||||
options: predictionOptions
|
||||
|
||||
@@ -4,21 +4,6 @@
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>ESpeakNG.framework/Versions/A/ESpeakNG</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ESpeakNG.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>ESpeakNG.framework/ESpeakNG</string>
|
||||
@@ -35,15 +20,28 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>ESpeakNG.framework/ESpeakNG</string>
|
||||
<string>ESPeakNG.framework/Versions/A/ESPeakNG</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<string>macos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ESpeakNG.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>ESpeakNG.framework/ESpeakNG</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ESpeakNG.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
|
||||
Executable
BIN
Binary file not shown.
+3
@@ -0,0 +1,3 @@
|
||||
#import <ESpeakNG/espeak_ng.h>
|
||||
#import <ESpeakNG/speak_lib.h>
|
||||
#import <ESpeakNG/encoding.h>
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Reece H. Dunn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see: <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef ESPEAK_NG_ENCODING_H
|
||||
#define ESPEAK_NG_ENCODING_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ESPEAKNG_ENCODING_UNKNOWN,
|
||||
ESPEAKNG_ENCODING_US_ASCII,
|
||||
ESPEAKNG_ENCODING_ISO_8859_1,
|
||||
ESPEAKNG_ENCODING_ISO_8859_2,
|
||||
ESPEAKNG_ENCODING_ISO_8859_3,
|
||||
ESPEAKNG_ENCODING_ISO_8859_4,
|
||||
ESPEAKNG_ENCODING_ISO_8859_5,
|
||||
ESPEAKNG_ENCODING_ISO_8859_6,
|
||||
ESPEAKNG_ENCODING_ISO_8859_7,
|
||||
ESPEAKNG_ENCODING_ISO_8859_8,
|
||||
ESPEAKNG_ENCODING_ISO_8859_9,
|
||||
ESPEAKNG_ENCODING_ISO_8859_10,
|
||||
ESPEAKNG_ENCODING_ISO_8859_11,
|
||||
// ISO-8859-12 is not a valid encoding.
|
||||
ESPEAKNG_ENCODING_ISO_8859_13,
|
||||
ESPEAKNG_ENCODING_ISO_8859_14,
|
||||
ESPEAKNG_ENCODING_ISO_8859_15,
|
||||
ESPEAKNG_ENCODING_ISO_8859_16,
|
||||
ESPEAKNG_ENCODING_KOI8_R,
|
||||
ESPEAKNG_ENCODING_ISCII,
|
||||
ESPEAKNG_ENCODING_UTF_8,
|
||||
ESPEAKNG_ENCODING_ISO_10646_UCS_2,
|
||||
} espeak_ng_ENCODING;
|
||||
|
||||
ESPEAK_NG_API espeak_ng_ENCODING
|
||||
espeak_ng_EncodingFromName(const char *encoding);
|
||||
|
||||
typedef struct espeak_ng_TEXT_DECODER_ espeak_ng_TEXT_DECODER;
|
||||
|
||||
ESPEAK_NG_API espeak_ng_TEXT_DECODER *
|
||||
create_text_decoder(void);
|
||||
|
||||
ESPEAK_NG_API void
|
||||
destroy_text_decoder(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string(espeak_ng_TEXT_DECODER *decoder,
|
||||
const char *string,
|
||||
int length,
|
||||
espeak_ng_ENCODING encoding);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string_auto(espeak_ng_TEXT_DECODER *decoder,
|
||||
const char *string,
|
||||
int length,
|
||||
espeak_ng_ENCODING encoding);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_wstring(espeak_ng_TEXT_DECODER *decoder,
|
||||
const wchar_t *string,
|
||||
int length);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string_multibyte(espeak_ng_TEXT_DECODER *decoder,
|
||||
const void *input,
|
||||
espeak_ng_ENCODING encoding,
|
||||
int flags);
|
||||
|
||||
ESPEAK_NG_API int
|
||||
text_decoder_eof(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API uint32_t
|
||||
text_decoder_getc(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API uint32_t
|
||||
text_decoder_peekc(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API const void *
|
||||
text_decoder_get_buffer(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Reece H. Dunn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see: <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef ESPEAK_NG_ENCODING_H
|
||||
#define ESPEAK_NG_ENCODING_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ESPEAKNG_ENCODING_UNKNOWN,
|
||||
ESPEAKNG_ENCODING_US_ASCII,
|
||||
ESPEAKNG_ENCODING_ISO_8859_1,
|
||||
ESPEAKNG_ENCODING_ISO_8859_2,
|
||||
ESPEAKNG_ENCODING_ISO_8859_3,
|
||||
ESPEAKNG_ENCODING_ISO_8859_4,
|
||||
ESPEAKNG_ENCODING_ISO_8859_5,
|
||||
ESPEAKNG_ENCODING_ISO_8859_6,
|
||||
ESPEAKNG_ENCODING_ISO_8859_7,
|
||||
ESPEAKNG_ENCODING_ISO_8859_8,
|
||||
ESPEAKNG_ENCODING_ISO_8859_9,
|
||||
ESPEAKNG_ENCODING_ISO_8859_10,
|
||||
ESPEAKNG_ENCODING_ISO_8859_11,
|
||||
// ISO-8859-12 is not a valid encoding.
|
||||
ESPEAKNG_ENCODING_ISO_8859_13,
|
||||
ESPEAKNG_ENCODING_ISO_8859_14,
|
||||
ESPEAKNG_ENCODING_ISO_8859_15,
|
||||
ESPEAKNG_ENCODING_ISO_8859_16,
|
||||
ESPEAKNG_ENCODING_KOI8_R,
|
||||
ESPEAKNG_ENCODING_ISCII,
|
||||
ESPEAKNG_ENCODING_UTF_8,
|
||||
ESPEAKNG_ENCODING_ISO_10646_UCS_2,
|
||||
} espeak_ng_ENCODING;
|
||||
|
||||
ESPEAK_NG_API espeak_ng_ENCODING
|
||||
espeak_ng_EncodingFromName(const char *encoding);
|
||||
|
||||
typedef struct espeak_ng_TEXT_DECODER_ espeak_ng_TEXT_DECODER;
|
||||
|
||||
ESPEAK_NG_API espeak_ng_TEXT_DECODER *
|
||||
create_text_decoder(void);
|
||||
|
||||
ESPEAK_NG_API void
|
||||
destroy_text_decoder(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string(espeak_ng_TEXT_DECODER *decoder,
|
||||
const char *string,
|
||||
int length,
|
||||
espeak_ng_ENCODING encoding);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string_auto(espeak_ng_TEXT_DECODER *decoder,
|
||||
const char *string,
|
||||
int length,
|
||||
espeak_ng_ENCODING encoding);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_wstring(espeak_ng_TEXT_DECODER *decoder,
|
||||
const wchar_t *string,
|
||||
int length);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
text_decoder_decode_string_multibyte(espeak_ng_TEXT_DECODER *decoder,
|
||||
const void *input,
|
||||
espeak_ng_ENCODING encoding,
|
||||
int flags);
|
||||
|
||||
ESPEAK_NG_API int
|
||||
text_decoder_eof(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API uint32_t
|
||||
text_decoder_getc(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API uint32_t
|
||||
text_decoder_peekc(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
ESPEAK_NG_API const void *
|
||||
text_decoder_get_buffer(espeak_ng_TEXT_DECODER *decoder);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
#ifndef ESPEAK_NG_H
|
||||
#define ESPEAK_NG_H
|
||||
|
||||
#include <ESpeakNG/speak_lib.h>
|
||||
#include "speak_lib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
+6
@@ -541,6 +541,12 @@ ESPEAK_API const char *espeak_TextToPhonemes(const void **textptr, int textmode,
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
ESPEAK_API const char *espeak_TextToPhonemesWithTerminator(const void **textptr, int textmode, int phonememode, int *terminator);
|
||||
/* Version of espeak_TextToPhonemes that also returns the clause terminator (e.g., CLAUSE_INTONATION_FULL_STOP) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
#ifndef ESPEAK_NG_H
|
||||
#define ESPEAK_NG_H
|
||||
|
||||
#include <ESpeakNG/speak_lib.h>
|
||||
#include "speak_lib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
+6
@@ -541,6 +541,12 @@ ESPEAK_API const char *espeak_TextToPhonemes(const void **textptr, int textmode,
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
ESPEAK_API const char *espeak_TextToPhonemesWithTerminator(const void **textptr, int textmode, int phonememode, int *terminator);
|
||||
/* Version of espeak_TextToPhonemes that also returns the clause terminator (e.g., CLAUSE_INTONATION_FULL_STOP) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>ESpeakNG</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kokoro.espeakng</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>ESpeakNG</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.52.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.52.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>17.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
framework module ESpeakNG {
|
||||
umbrella header "ESpeakNG.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kokoro.espeakng.data</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>espeak-ng-data</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+8
-8
@@ -1,8 +1,8 @@
|
||||
name Lingua Franca Nova
|
||||
language lfn
|
||||
|
||||
phonemes base2
|
||||
l_unpronouncable 0
|
||||
numbers 2 3
|
||||
|
||||
stressLength 150 140 180 180 0 0 200 200
|
||||
name Lingua Franca Nova
|
||||
language lfn
|
||||
|
||||
phonemes base2
|
||||
l_unpronouncable 0
|
||||
numbers 2 3
|
||||
|
||||
stressLength 150 140 180 180 0 0 200 200
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user