Skip to content

Commit 37ae12d

Browse files
committed
Update README and csproj License reference
1 parent 8f22010 commit 37ae12d

File tree

4 files changed

+98
-31
lines changed

4 files changed

+98
-31
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,43 @@
33
[voicevox_core](https://github.com/voicevox/voicevox_core) を C# から使用するためのラッパー。
44
薄いラッパーであるため、基本的には voicevox_core のドキュメントを参照し使用できます。
55

6-
CLI アプリケーションや Unity アプリケーションなどで、直接 voicevox_core を扱うことを目的としています。
6+
CLI アプリケーションや MAUI、Unity アプリケーションなどで、直接 voicevox_core を扱うことを目的としています。
77

8-
## Notice
8+
## Usage
99

10-
現在 voicevox_core の main ブランチをトラッキングしているため、製品版のリリースとの互換性がありません
11-
今後のリリースで、voicevox_engine で利用されている compatible_engine や、製品版 core に含まれている c_api の対応を予定しています
10+
このライブラリを使用するには、voicevox_core のライブラリを自身で用意する必要があります
11+
[voicevox_core](https://github.com/voicevox/voicevox_core) の Release ページから対応するバージョンのライブラリをダウンロードしてください
1212

13-
詳細なトラッキングしているバージョンは Git Submodule として取得している [voicevox_core](./binding/voicevox_core) のコミットハッシュ、もしくは [VoicevoxCoreCommitHash](./src/VoicevoxCoreSharp.Core/VoicevoxCoreSharp.Core.Metas.props) を参照してください。
13+
それぞれダウンロードしたライブラリを .NET アプリケーションから参照できるように配置してください。
14+
各プラットフォームやアプリケーションの種類によって配置先が異なる場合があります。
15+
16+
以下の Sample に CLI、MAUI、Unity のサンプルがあるため、そのサンプルの csproj などを参考にしてください。
17+
18+
特に MAUI アプリケーションで Android や iOS で使用する場合は、Native Library のパス解決の問題があるため、[VoicevoxCoreSharp.MAUI](./src/VoicevoxCoreSharp.MAUI) を使用することをお勧めします。
1419

1520
## Sample
1621

1722
[examples/cli](./examples/cli) にコマンドラインから実行するサンプル実装があります。
1823

19-
[examples/UnitySample](./examples/UnitySample) に Unity アプリケーションのサンプルがあります(Editor 上では音声の生成に失敗することがあるため、パッケージングを行ってください)。
24+
[examples/UnitySample](./examples/UnitySample) に Unity アプリケーションのサンプルがあります。
25+
26+
[examples/MAUI](./examples/MAUI) に MAUI アプリケーションのサンプルがあります。
2027

2128
## Supported
2229

2330
- .NET Standard 2.0
2431
- C# 9.0
2532
- Unity 2021.3 (LTS) を最低限サポートするため
33+
34+
## Notice
35+
36+
本リポジトリは voicevox_core の main ブランチをトラッキングしているため、main ブランチの状態は製品版のリリースとの互換性がない場合があります。
37+
voicevox_core のリリースに合わせて、Release タグや、nuget パッケージを提供しているため、実際に利用する場合はそちらを利用してください。
38+
39+
詳細なトラッキングしているバージョンは Git Submodule として取得している [voicevox_core](./binding/voicevox_core) のコミットハッシュ、もしくは [VoicevoxCoreCommitHash](./src/VoicevoxCoreSharp.Core/VoicevoxCoreSharp.Core.Metas.props) を参照してください。
40+
41+
今後のリリースで、voicevox_engine で利用されている compatible_engine などの対応を検討しています。
42+
43+
## License
44+
45+
[MIT](./LICENSE)

src/VoicevoxCoreSharp.Core/VoicevoxCoreSharp.Core.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<RepositoryUrl>https://github.com/yamachu/VoicevoxCoreSharp</RepositoryUrl>
2424
<PackageTags>voicevox;tts</PackageTags>
2525
<PackageReadmeFile>README.md</PackageReadmeFile>
26+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2627

2728
<DebugType>portable</DebugType>
2829
<IncludeSymbols>true</IncludeSymbols>
@@ -35,6 +36,7 @@
3536

3637
<ItemGroup>
3738
<None Include="../../README.md" Pack="true" PackagePath="/" />
39+
<None Include="../../LICENSE" Pack="true" PackagePath="/" />
3840
</ItemGroup>
3941

4042
<ItemGroup>
Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
WIP
1+
# VoicevoxCoreSharp.MAUI
2+
3+
VoicevoxCoreSharp の MAUI アプリケーション向けのヘルパーライブラリです。
4+
5+
## Usage
6+
7+
Android や iOS で使用する場合、voicevox_core のライブラリのパスの解決に問題があるため、本ライブラリを import して利用します。
8+
9+
### Android
10+
11+
MainApplications.cs のコンストラクタなどで以下のように呼び出します。
12+
13+
```cs
14+
using VoicevoxCoreSharp.MAUI; // <- Add
15+
16+
...
17+
18+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
19+
: base(handle, ownership)
20+
{
21+
CoreHelper.Initialize(null); // <- Add
22+
}
23+
```
24+
25+
### iOS
26+
27+
Program.cs の Main メソッドなどで以下のように呼び出します。
28+
29+
```cs
30+
using VoicevoxCoreSharp.MAUI; // <- Add
31+
32+
...
33+
34+
static void Main(string[] args)
35+
{
36+
CoreHelper.Initialize(null);
37+
}
38+
```
39+
40+
その他の VoicevoxCoreSharp の使い方は、[VoicevoxCoreSharp](https://github.com/yamachu/VoicevoxCoreSharp) を参照してください。
41+
42+
## License
43+
44+
[MIT](../../LICENSE)
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6-
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
8-
<UseMaui>true</UseMaui>
9-
<SingleProject>true</SingleProject>
10-
<ImplicitUsings>enable</ImplicitUsings>
11-
<Nullable>enable</Nullable>
12-
13-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
14-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
15-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
16-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
17-
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
18-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6+
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
8+
<UseMaui>true</UseMaui>
9+
<SingleProject>true</SingleProject>
10+
<ImplicitUsings>enable</ImplicitUsings>
11+
<Nullable>enable</Nullable>
12+
13+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
14+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
15+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
16+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
17+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
18+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
1919

2020
<!-- NuGet Package Properties -->
2121
<PackageId>VoicevoxCoreSharp.MAUI</PackageId>
@@ -26,28 +26,30 @@
2626
<RepositoryUrl>https://github.com/yamachu/VoicevoxCoreSharp</RepositoryUrl>
2727
<PackageTags>voicevox;tts;maui</PackageTags>
2828
<PackageReadmeFile>README.md</PackageReadmeFile>
29+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2930

3031
<DebugType>portable</DebugType>
3132
<IncludeSymbols>true</IncludeSymbols>
3233
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3334
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3435
<EmbedUntrackedSources>true</EmbedUntrackedSources>
35-
</PropertyGroup>
36-
37-
<ItemGroup>
36+
</PropertyGroup>
37+
38+
<ItemGroup>
3839
<ProjectReference Include="..\VoicevoxCoreSharp.Core\VoicevoxCoreSharp.Core.csproj">
3940
<PrivateAssets>None</PrivateAssets>
4041
</ProjectReference>
4142
</ItemGroup>
4243

4344
<ItemGroup>
4445
<None Include="README.md" Pack="true" PackagePath="/" />
46+
<None Include="../../LICENSE" Pack="true" PackagePath="/" />
4547
</ItemGroup>
4648

4749
<ItemGroup>
4850
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
49-
</ItemGroup>
50-
51+
</ItemGroup>
52+
5153
<!-- https://blog.azyobuzi.net/2020/05/03/01-projectref/ -->
5254
<!-- dotnet pack -p:CoreVersion=0.16.0 -p:PackageVersion=0.16.0 -->
5355
<Target Name="SetDependencyVersion" AfterTargets="_GetProjectReferenceVersions">
@@ -56,4 +58,4 @@
5658
</ItemGroup>
5759
</Target>
5860

59-
</Project>
61+
</Project>

0 commit comments

Comments
 (0)