function generate_openai_audio_on_publish($post_id) { if (get_post_type($post_id) !== 'post') return; $post = get_post($post_id); $text = wp_strip_all_tags($post->post_content); $text = mb_substr($text, 0, 4000); // Limit text length $api_key = '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'; // Replace with your real key $voice = 'nova'; // voice option $response = wp_remote_post('https://api.openai.com/v1/audio/speech', [ 'headers' => [ 'Authorization' => 'Bearer ' . $api_key, 'Content-Type' => 'application/json' ], 'body' => json_encode([ 'model' => 'tts-1', 'voice' => $voice, 'input' => $text ]) ]); if (is_wp_error($response)) return; $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (!$data || empty($data['audio_url'])) return; $audio_url = $data['audio_url']; // Download audio file from OpenAI $audio_response = wp_remote_get($audio_url); if (is_wp_error($audio_response)) return; $audio_content = wp_remote_retrieve_body($audio_response); if (!$audio_content) return; // Save the audio file to uploads folder $upload = wp_upload_bits("post-{$post_id}.mp3", null, $audio_content); if ($upload['error']) return; // Save URL in post meta for later retrieval update_post_meta($post_id, '_openai_audio_url', $upload['url']); } MinDA showcases Mindanao investment opportunities at Singapore Summit - newslineph.press

MinDA showcases Mindanao investment opportunities at Singapore Summit

0

Secretary Leo Magno stressed Mindanao's role in ensuring food security, peace, trade, investments, prosperity, and sustainable global environmental commitments.

DAVAO CITY – The Mindanao Development Authority (MinDA) spearheaded a delegation of business leaders and private sector representatives to the 4th Philippines-Singapore Business and Investment Summit (PSBIS) in Singapore on Thursday. The primary goal was to present compelling investment opportunities that could propel Mindanao’s economic advancement.

Acting as the event’s key resource speaker, MinDA Secretary Leo Tereso Magno showcased “Investment and Business Opportunities in Mindanao” during his presentation, alongside government officials and business leaders from the Philippines and Singapore.

“We are privileged to facilitate the participation of Mindanao’s private sector in this significant summit, fostering key partnerships between both countries’ private sectors while showcasing the region’s potential,” remarked Magno in a statement.

He emphasized the strong ties between Mindanao and Singapore, not just in geographical proximity but also in cultural and economic aspects. Magno expressed optimism for jointly building a prosperous future, highlighting Mindanao’s role in ensuring food security, peace, trade, investments, prosperity, and sustainable global environmental commitments.

Presenting Mindanao’s strategic advantages such as a sizable consumer market, a youthful workforce, and its geographic significance, Magno positioned the region as a prime investment hub with immense growth potential.

Underpinning the economic progress during President Ferdinand Marcos Jr.’s administration, Magno noted that Mindanao had achieved an average growth rate of 6.2 percent, surpassing the preceding eight-year average of 4.66 percent.

In conjunction with the summit, MinDA organized a Mindanao Business Networking session where local entrepreneurs engaged with over 30 Singaporean business leaders to explore prospective investment collaborations and strategies.

“There is a wealth of business opportunities in Mindanao that we can capitalize on and optimize under President Marcos Jr.’s leadership,” Magno remarked confidently..

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © All rights reserved. | CoverNews by AF themes.