Skip to content

Commit

Permalink
rm from bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Jul 19, 2024
1 parent 386d272 commit d7a0b3f
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 213 deletions.
62 changes: 0 additions & 62 deletions binding/dotnet/Porcupine/Porcupine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,6 @@
<Link>lib\raspberry-pi\%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\jetson\cortex-a57-aarch64\libpv_porcupine.so">
<PackagePath>
build/netcoreapp3.0/lib/jetson/cortex-a57-aarch64/libpv_porcupine.so;
build/net6.0/lib/jetson/cortex-a57-aarch64/libpv_porcupine.so;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\jetson\cortex-a57-aarch64\libpv_porcupine.so</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\beaglebone\libpv_porcupine.so">
<PackagePath>
build/netcoreapp3.0/lib/beaglebone/libpv_porcupine.so;
build/net6.0/lib/beaglebone/libpv_porcupine.so;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\beaglebone\libpv_porcupine.so</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

<!--.NET 6.0+ libs-->
Expand Down Expand Up @@ -211,50 +193,6 @@
<Link>resources\keyword_files\raspberry-pi\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\resources\keyword_files\jetson\alexa_jetson.ppn;
..\..\..\resources\keyword_files\jetson\americano_jetson.ppn;
..\..\..\resources\keyword_files\jetson\blueberry_jetson.ppn;
..\..\..\resources\keyword_files\jetson\bumblebee_jetson.ppn;
..\..\..\resources\keyword_files\jetson\computer_jetson.ppn;
..\..\..\resources\keyword_files\jetson\grapefruit_jetson.ppn;
..\..\..\resources\keyword_files\jetson\grasshopper_jetson.ppn;
..\..\..\resources\keyword_files\jetson\hey google_jetson.ppn;
..\..\..\resources\keyword_files\jetson\hey siri_jetson.ppn;
..\..\..\resources\keyword_files\jetson\jarvis_jetson.ppn;
..\..\..\resources\keyword_files\jetson\ok google_jetson.ppn;
..\..\..\resources\keyword_files\jetson\picovoice_jetson.ppn;
..\..\..\resources\keyword_files\jetson\porcupine_jetson.ppn;
..\..\..\resources\keyword_files\jetson\terminator_jetson.ppn;">
<PackagePath>
build/netstandard2.0/resources/keyword_files/jetson;
build/netcoreapp3.0/resources/keyword_files/jetson;
build/net6.0/resources/keyword_files/jetson;
</PackagePath>
<Link>resources\keyword_files\jetson\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\resources\keyword_files\beaglebone\alexa_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\americano_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\blueberry_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\bumblebee_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\computer_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\grapefruit_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\grasshopper_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\hey google_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\hey siri_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\jarvis_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\ok google_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\picovoice_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\porcupine_beaglebone.ppn;
..\..\..\resources\keyword_files\beaglebone\terminator_beaglebone.ppn;">
<PackagePath>
build/netstandard2.0/resources/keyword_files/beaglebone;
build/netcoreapp3.0/resources/keyword_files/beaglebone;
build/net6.0/resources/keyword_files/beaglebone;
</PackagePath>
<Link>resources\keyword_files\beaglebone\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\lib\common\porcupine_params.pv">
<PackagePath>
build/netstandard2.0/lib/common/porcupine_params.pv;
Expand Down
2 changes: 0 additions & 2 deletions binding/dotnet/Porcupine/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ public static string PvLinuxEnv()
case "0xd03":
case "0xd08":
case "0xd0b": return "raspberry-pi";
case "0xd07": return "jetson";
case "0xc08": return "beaglebone";
default:
throw new PlatformNotSupportedException($"This device (CPU part = {cpuPart}) is not supported by Picovoice.");
}
Expand Down
2 changes: 0 additions & 2 deletions binding/dotnet/PorcupineTest/MainTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ private static string PvLinuxEnv()
case "0xd03":
case "0xd08":
case "0xd0b": return "raspberry-pi";
case "0xd07": return "jetson";
case "0xc08": return "beaglebone";
default:
throw new PlatformNotSupportedException($"This device (CPU part = {cpuPart}) is not supported by Picovoice.");
}
Expand Down
3 changes: 0 additions & 3 deletions binding/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ Platforms compatible with .NET Core 2.0+:
Platforms compatible with .NET Core 3.0+:

- Raspberry Pi:
- 2
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
- NVIDIA Jetson Nano
- BeagleBone

Platform compatible with .NET 6.0+:

Expand Down
4 changes: 2 additions & 2 deletions binding/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ applications. It is
- compact and computationally-efficient. It is perfect for IoT.
- cross-platform:
- Arm Cortex-M, STM32, Arduino, and i.MX RT
- Raspberry Pi, NVIDIA Jetson Nano, and BeagleBone
- Raspberry Pi
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
Expand All @@ -21,7 +21,7 @@ applications. It is
## Compatibility

- Go 1.16+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi, NVIDIA Jetson (Nano), and BeagleBone.
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi.
- **Windows**: The Go binding requires `cgo`, which means that you need to install a gcc compiler like [Mingw](http://mingw-w64.org/) to build it properly.
- Go versions less than `1.20` requires `gcc` version `11` or lower.

Expand Down
10 changes: 1 addition & 9 deletions binding/go/copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@ cp ../../lib/windows/amd64/libpv_porcupine.dll ./embedded/lib/windows/amd64/libp
echo "Copying RPi libs..."
cp -rp ../../lib/raspberry-pi/* ./embedded/lib/raspberry-pi

echo "Copying Jetson lib..."
cp ../../lib/jetson/cortex-a57-aarch64/libpv_porcupine.so ./embedded/lib/jetson/cortex-a57-aarch64/libpv_porcupine.so

echo "Copying BeagleBone lib..."
cp ../../lib/beaglebone/libpv_porcupine.so ./embedded/lib/beaglebone/libpv_porcupine.so

echo "Copying keyword files"
for keyword in "${KEYWORDS[@]}"; do
cp ../../resources/keyword_files/windows/"$keyword"_windows.ppn ./embedded/resources/keyword_files/windows/
cp ../../resources/keyword_files/mac/"$keyword"_mac.ppn ./embedded/resources/keyword_files/mac/
cp ../../resources/keyword_files/linux/"$keyword"_linux.ppn ./embedded/resources/keyword_files/linux/
cp ../../resources/keyword_files/raspberry-pi/"$keyword"_raspberry-pi.ppn ./embedded/resources/keyword_files/raspberry-pi/
cp ../../resources/keyword_files/jetson/"$keyword"_jetson.ppn ./embedded/resources/keyword_files/jetson/
cp ../../resources/keyword_files/beaglebone/"$keyword"_beaglebone.ppn ./embedded/resources/keyword_files/beaglebone/
done

echo "Copy complete!"
echo "Copy complete!"
6 changes: 0 additions & 6 deletions binding/go/porcupine.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,18 +394,12 @@ func getLinuxDetails() (string, string) {
switch cpuPart {
case "0xb76":
return "raspberry-pi", "arm11" + archInfo
case "0xc07":
return "raspberry-pi", "cortex-a7" + archInfo
case "0xd03":
return "raspberry-pi", "cortex-a53" + archInfo
case "0xd07":
return "jetson", "cortex-a57" + archInfo
case "0xd08":
return "raspberry-pi", "cortex-a72" + archInfo
case "0xd0b":
return "raspberry-pi", "cortex-a76" + archInfo
case "0xc08":
return "beaglebone", ""
default:
log.Fatalf("Unsupported CPU:\n%s", cpuPart)
return "", ""
Expand Down
4 changes: 1 addition & 3 deletions binding/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ To learn more about Porcupine, see the [product](https://picovoice.ai/products/p
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Raspberry Pi 2, Raspberry Pi 3 (32 and 64 bit), Raspberry Pi 4 (32 and 64 bit), Raspberry Pi 5 (32 and 64 bit)
- Jetson Nano
- BeagleBone
- Raspberry Pi 3 (32 and 64 bit), Raspberry Pi 4 (32 and 64 bit), Raspberry Pi 5 (32 and 64 bit)

## Installation

Expand Down
48 changes: 1 addition & 47 deletions binding/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,42 +110,6 @@ task copyRPiKeywordResources(type: Copy) {
'terminator_raspberry-pi.ppn')
into("${outputDir}/porcupine/resources/keyword_files/raspberry-pi/")
}
task copyJetsonKeywordResources(type: Copy) {
from('../../resources/keyword_files/jetson')
include('alexa_jetson.ppn',
'americano_jetson.ppn',
'blueberry_jetson.ppn',
'bumblebee_jetson.ppn',
'computer_jetson.ppn',
'grapefruit_jetson.ppn',
'grasshopper_jetson.ppn',
'hey google_jetson.ppn',
'hey siri_jetson.ppn',
'jarvis_jetson.ppn',
'ok google_jetson.ppn',
'picovoice_jetson.ppn',
'porcupine_jetson.ppn',
'terminator_jetson.ppn')
into("${outputDir}/porcupine/resources/keyword_files/jetson/")
}
task copyBeagleboneKeywordResources(type: Copy) {
from('../../resources/keyword_files/beaglebone')
include('alexa_beaglebone.ppn',
'americano_beaglebone.ppn',
'blueberry_beaglebone.ppn',
'bumblebee_beaglebone.ppn',
'computer_beaglebone.ppn',
'grapefruit_beaglebone.ppn',
'grasshopper_beaglebone.ppn',
'hey google_beaglebone.ppn',
'hey siri_beaglebone.ppn',
'jarvis_beaglebone.ppn',
'ok google_beaglebone.ppn',
'picovoice_beaglebone.ppn',
'porcupine_beaglebone.ppn',
'terminator_beaglebone.ppn')
into("${outputDir}/porcupine/resources/keyword_files/beaglebone/")
}

task copyDefaultModel(type: Copy) {
from('../../lib/common/porcupine_params.pv') into "${outputDir}/porcupine/lib/common/"
Expand Down Expand Up @@ -173,27 +137,17 @@ task copyRPiLib(type: Copy) {
'cortex-a76-aarch64/libpv_porcupine_jni.so')
into("${outputDir}/porcupine/lib/java/raspberry-pi/")
}
task copyJetsonLib(type: Copy) {
from('../../lib/java/jetson/cortex-a57-aarch64/libpv_porcupine_jni.so') into "${outputDir}/porcupine/lib/java/jetson/cortex-a57-aarch64/"
}
task copyBeagleboneLib(type: Copy) {
from('../../lib/java/beaglebone/libpv_porcupine_jni.so') into "${outputDir}/porcupine/lib/java/beaglebone/"
}

task copyTasks(type: GradleBuild) {
tasks = ['copyLinuxKeywordResources',
'copyMacKeywordResources',
'copyWindowsKeywordResources',
'copyRPiKeywordResources',
'copyJetsonKeywordResources',
'copyBeagleboneKeywordResources',
'copyDefaultModel',
'copyLinuxLib',
'copyMacLib',
'copyWindowsLib',
'copyRPiLib',
'copyJetsonLib',
'copyBeagleboneLib']
'copyRPiLib']
}

jar {
Expand Down
12 changes: 1 addition & 11 deletions binding/java/src/ai/picovoice/porcupine/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ public static String getEnvironmentName() throws RuntimeException {
case "0xd08":
case "0xd0b":
return "raspberry-pi";
case "0xd07":
return "jetson";
case "0xc08":
return "beaglebone";
default:
throw new RuntimeException(String.format("Execution environment " +
"not supported. Porcupine Java does not support CPU Part (%s).",
Expand Down Expand Up @@ -173,17 +169,13 @@ private static String getArchitecture() throws RuntimeException {
if (isX86_64) {
return "x86_64";
}
} else if (isArm) { // RPI, Beaglebone, etc..
} else if (isArm) { // RPI
String cpuPart = getCpuPart();
String archInfo = (arch.equals("aarch64")) ? "-aarch64" : "";

switch (cpuPart) {
case "0xc07":
return "cortex-a7" + archInfo;
case "0xd03":
return "cortex-a53" + archInfo;
case "0xd07":
return "cortex-a57" + archInfo;
case "0xd08":
return "cortex-a72" + archInfo;
case "0xd0b":
Expand Down Expand Up @@ -257,8 +249,6 @@ public static String getPackagedLibraryPath() {
return RESOURCE_DIRECTORY.resolve("lib/java/mac")
.resolve(ARCHITECTURE)
.resolve("libpv_porcupine_jni.dylib").toString();
case "jetson":
case "beaglebone":
case "raspberry-pi":
case "linux":
return RESOURCE_DIRECTORY.resolve("lib/java")
Expand Down
4 changes: 1 addition & 3 deletions binding/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ This binding is for running Porcupine on **Node.js 16+** on the following platfo
- Windows (x86_64)
- Linux (x86_64)
- macOS (x86_64, arm64)
- Raspberry Pi (2, 3, 4, 5)
- NVIDIA Jetson (Nano)
- BeagleBone
- Raspberry Pi (3, 4, 5)

### Web Browsers

Expand Down
2 changes: 1 addition & 1 deletion binding/nodejs/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ncp(
}
);

let platforms = ["beaglebone", "jetson", "linux", "mac", "raspberry-pi", "windows"];
let platforms = ["linux", "mac", "raspberry-pi", "windows"];

// Keywords (resources)
// Only ship keywords that work on every platform (LCD)
Expand Down
21 changes: 0 additions & 21 deletions binding/nodejs/src/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ const X86_64 = "x64";
const ARM_32 = "arm";
const ARM_64 = "arm64";

const PLATFORM_BEAGLEBONE = "beaglebone";
const PLATFORM_JETSON = "jetson";
const PLATFORM_LINUX = "linux";
const PLATFORM_MAC = "mac";
const PLATFORM_RASPBERRY_PI = "raspberry-pi";
const PLATFORM_WINDOWS = "windows";

const ARM_CPU_64 = "-aarch64";
const ARM_CPU_CORTEX_A7 = "cortex-a7";
const ARM_CPU_CORTEX_A53 = "cortex-a53";
const ARM_CPU_CORTEX_A57 = "cortex-a57";
const ARM_CPU_CORTEX_A72 = "cortex-a72";
const ARM_CPU_CORTEX_A76 = "cortex-a72";

Expand All @@ -52,10 +48,6 @@ SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${X86_64}`,
`${PLATFORM_LINUX}/x86_64/pv_porcupine.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A7}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A7}/pv_porcupine.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A53}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A53}/pv_porcupine.node`
Expand All @@ -80,14 +72,6 @@ SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A76}${ARM_CPU_64}`,
`${PLATFORM_RASPBERRY_PI}/${ARM_CPU_CORTEX_A76}${ARM_CPU_64}/pv_porcupine.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${ARM_CPU_CORTEX_A57}${ARM_CPU_64}`,
`${PLATFORM_JETSON}/${ARM_CPU_CORTEX_A57}${ARM_CPU_64}/pv_porcupine.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_LINUX}/${PLATFORM_BEAGLEBONE}`,
`${PLATFORM_BEAGLEBONE}/pv_porcupine.node`
);
SYSTEM_TO_LIBRARY_PATH.set(
`${SYSTEM_WINDOWS}/${X86_64}`,
`${PLATFORM_WINDOWS}/amd64/pv_porcupine.node`
Expand Down Expand Up @@ -115,8 +99,6 @@ function getLinuxPlatform(): string {
case "0xd03":
case "0xd08":
case "0xd0b": return PLATFORM_RASPBERRY_PI;
case "0xd07": return PLATFORM_JETSON;
case "0xc08": return PLATFORM_BEAGLEBONE;
default:
throw new PorcupineRuntimeError(`Unsupported CPU: '${cpuPart}'`);
}
Expand All @@ -130,12 +112,9 @@ function getLinuxMachine(arch: string): string {

const cpuPart = getCpuPart();
switch (cpuPart) {
case "0xc07": return ARM_CPU_CORTEX_A7 + archInfo;
case "0xd03": return ARM_CPU_CORTEX_A53 + archInfo;
case "0xd07": return ARM_CPU_CORTEX_A57 + archInfo;
case "0xd08": return ARM_CPU_CORTEX_A72 + archInfo;
case "0xd0b": return ARM_CPU_CORTEX_A76 + archInfo;
case "0xc08": return PLATFORM_BEAGLEBONE;
default:
throw new PorcupineRuntimeError(`Unsupported CPU: '${cpuPart}'`);
}
Expand Down
4 changes: 2 additions & 2 deletions binding/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ applications. It is
- compact and computationally-efficient. It is perfect for IoT.
- cross-platform:
- Arm Cortex-M, STM32, Arduino, and i.MX RT
- Raspberry Pi, NVIDIA Jetson Nano, and BeagleBone
- Raspberry Pi
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
Expand All @@ -19,7 +19,7 @@ applications. It is
## Compatibility

- Python 3.8+
- Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64), Raspberry Pi, NVIDIA Jetson (Nano), and BeagleBone.
- Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64), and Raspberry Pi.

## Installation

Expand Down
Loading

0 comments on commit d7a0b3f

Please sign in to comment.