@@ -22,8 +22,9 @@ const infoProvider: Provider = ({ baseClient, app }) => {
2222 return c . json ( "0.0.1" ) ;
2323 } ) ;
2424
25- app . get ( "/supported_devices" , ( c ) =>
26- c . json ( { cpu : true , cuda : false , dml : false } )
25+ app . get (
26+ "/supported_devices" ,
27+ ( c ) => c . json ( { cpu : true , cuda : false , dml : false } ) ,
2728 ) ;
2829
2930 app . get ( "/engine_manifest" , async ( c ) => {
@@ -33,8 +34,12 @@ const infoProvider: Provider = ({ baseClient, app }) => {
3334 brand_name : "COEIROINK v2" ,
3435 uuid : "96755ba9-6c9d-4166-aaf3-86633dfa0ca5" ,
3536 url : "https://github.com/sevenc-nanashi/coeiroink-v2-bridge" ,
36- icon : await Deno . readFile ( dirname ( Deno . execPath ( ) ) + "icon.png" ) . then (
37- ( buf ) => toBase64 ( buf )
37+ icon : await Deno . readFile (
38+ Deno . execPath ( ) . endsWith ( "deno.exe" )
39+ ? new URL ( "./icon.png" , import . meta. url )
40+ : dirname ( Deno . execPath ( ) ) + "/icon.png" ,
41+ ) . then (
42+ ( buf ) => toBase64 ( buf ) ,
3843 ) ,
3944 default_sampling_rate : 24000 ,
4045 terms_of_service : "https://coeiroink.com/terms を参照して下さい。" ,
@@ -87,18 +92,18 @@ const infoProvider: Provider = ({ baseClient, app }) => {
8792 speaker . styles . map ( async ( style ) => ( {
8893 name : style . styleName ,
8994 id : await getOrAppendSpeaker ( speaker . speakerUuid , style . styleId ) ,
90- } ) )
95+ } ) ) ,
9196 ) ,
9297 version : speaker . version ,
93- } ) )
94- )
98+ } ) ) ,
99+ ) ,
95100 ) ;
96101 } ) ;
97102
98103 app . get ( "/speaker_info" , ( c ) => {
99104 const speakerUuid = c . req . query ( "speaker_uuid" ) ;
100105 const speaker = speakers . find (
101- ( speaker ) => speaker . speakerUuid === speakerUuid
106+ ( speaker ) => speaker . speakerUuid === speakerUuid ,
102107 ) ;
103108 if ( ! speaker || ! speakerUuid ) {
104109 c . status ( 404 ) ;
0 commit comments